Forked from lukescammell/ahk-autoreload-on-save.ahk
Last active
June 30, 2018 19:00
-
-
Save nimatrueway/f6798aec24bcb4af8cdf6536901a8d65 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;------------------------------------------------------------------------------- | |
; 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