
; Interact with THIS AHK Script
;------------------------------------------------

else if RMSearchTerm = rl%A_Space% ; Reload This script
{
	gui_destroy()
	Reload
}
else if RMSearchTerm = dir%A_Space% ; Open the directory for this script
{
	gui_destroy()
	Run, %A_ScriptDir%
}
else if RMSearchTerm = edit%A_Space% ; Edit host script
{
	gui_destroy()
	run, "C:\Windows\notepad.exe" "%A_ScriptFullPath%"
}



; Type Raw Text
;------------------------------------------------
else if RMSearchTerm = raw%A_Space% ; Paste clipboard content without formatting
{
	gui_destroy()
	SendRaw, %ClipBoard%
}


else if RMSearchTerm = ram%A_Space%  ; RAM Calculator
{
	CustomTool = RamMultiplier

	gui_search_title = How many GB? > clipboard
	gui_search_icon = %A_ICODir%\Ram_Metro.ico
	GuiSearch("REPLACEME")	; REPLACEME  text will be replaced with the text input
	StatExport(gui_search_title)
}

else if RMSearchTerm = time%A_Space%  ; Requests
{
	CustomTool = AHKTimeMultiplier

	gui_search_title = How much time? #M or #H > clipboard
	; gui_search_icon = %A_ICODir%\Ram_Metro.ico
	GuiSearch("REPLACEME")	; REPLACEME  text will be replaced with the text input
	StatExport(gui_search_title)
}

else if RMSearchTerm = ada%A_Space% ; Adapters
{
	gui_destroy()
	run, "C:\Windows\System32\ncpa.cpl" ; Network Adapters
}
else if RMSearchTerm = disk%A_Space% ; Disk Management
{
    gui_destroy()
    run, "diskmgmt.msc" ; Windows Disk management
}

else if RMSearchTerm = power ; Power down the pc
{
	gui_destroy()
	Shutdown, 8	; power off command
}

else if RMSearchTerm = date ; What is the date?
{
	gui_destroy()
	FormatTime, date,, LongDate
	MsgBox %date%
	date =
}
else if RMSearchTerm = week ; Which week is it?
{
	gui_destroy()
	FormatTime, weeknumber,, YWeek
	StringTrimLeft, weeknumbertrimmed, weeknumber, 4
	if (weeknumbertrimmed = 53)
	weeknumbertrimmed := 1
	MsgBox It is currently week %weeknumbertrimmed%
	weeknumber =
	weeknumbertrimmed =
}
else if RMSearchTerm = ?%A_Space% ; Tooltip with list of commands
{
	GuiControl,, RMSearchTerm, ; Clear the input box
	gui_destroy()
	Gosub, gui_commandlibrary
}
else if RMSearchTerm = a?%A_Space% ; Tooltip with list of commands
{
	GuiControl,, RMSearchTerm, ; Clear the input box
	gui_destroy()
	Gosub, gui_commandlibrary
}

return

