Code: Select all
#SingleInstance, force
#ifWinActive, ahk_exe ""
SetWorkingDir %A_ScriptDir%
full_command_line := DllCall("GetCommandLine", "str")
if not (A_IsAdmin or RegExMatch(full_command_line, " /restart(?!\S)"))
{
try
{
if A_IsCompiled
Run *RunAs "%A_ScriptFullPath%" /restart
else
Run *RunAs "%A_AhkPath%" /restart "%A_ScriptFullPath%"
}
ExitApp
}
#MaxThreadsPerHotkey 2
f8::
toggle = 1
while toggle {
Send, {w down}
Sleep 1000 <<<<<< batch 1
Send, {w up}
Sleep 1000
Send, {z}
Sleep 1000
<<<<<<<<<<< (if the color that was set is visible the line/script (batch 1) keeps looping)
<<<<<<<<<< (if the color that was set is not visible anymore the line/script (batch 1) stops)
<<<<<<<<<< ( if the color become visible again run the next line or script ) (batch 2) keeps looping as long as visible if not visible anymore = stop
Send, 1
Sleep 500
Send, 2
Sleep 500 <<<< batch 2
Send, 3
Sleep 500
}
return