Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nimatrueway/f6798aec24bcb4af8cdf6536901a8d65 to your computer and use it in GitHub Desktop.
Save nimatrueway/f6798aec24bcb4af8cdf6536901a8d65 to your computer and use it in GitHub Desktop.
;-------------------------------------------------------------------------------
; Auto-Reload AutoHotkey when .ahk file is saved
; http://prxbx.com/forums/showthread.php?tid=1181
; Modified 2009-12-09 11:32:17 by Luke Scammell - luke {at} scammell [dot] co (.) uk
; Modified to match any window with .ahk in the title, meaning it will update other scripts as well and from other programs like Notepad++ :)
~^s::
SetTitleMatchMode, 2
FileGetTime ScriptStartModTime, %A_ScriptFullPath%
#If WinActive(A_ScriptName " ahk_exe Code.exe") ; change Code.exe with your ahk editor executable
~^s::
Send, ^s
global ScriptStartModTime
FileGetTime curModTime, %A_ScriptFullPath%
If (curModTime <> ScriptStartModTime) {
SplashTextOn,,,Updated script,
Sleep,500
SplashTextOff
Reload
}
return
;------------------------------------------------------------------------------/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment