Somewhere near the start of the script in the auto-execute section
Anywhere in the script (usually somewhere below):
CheckScriptUpdate() { global ScriptStartModTime FileGetTime curModTime, %A_ScriptFullPath% If (curModTime <> ScriptStartModTime) { Loop { reload Sleep 300 ; ms MsgBox 0x2, %A_ScriptName%, Reload failed. ; 0x2 = Abort/Retry/Ignore IfMsgBox Abort ExitApp IfMsgBox Ignore break } ; loops reload on "Retry" } }
source share