Not a bad thread to necro
;; Auto-Reload If Changes Are Made
{
SetTimer,UPDATEDSCRIPT,1000
UPDATEDSCRIPT:
FileGetAttrib,attribs,%A_ScriptFullPath%
IfInString,attribs,A
{
FileSetAttrib,-A,%A_ScriptFullPath%
SplashTextOn,,,Updated script,
Sleep,500
Reload
}
Return
}
Capslock::
Gui, 99:+ToolWindow
Gui, 99:Show, x-1 y-1 +NoActivate, Dummy IJKL to Arrow Keys
Keywait, Capslock
If A_ThisHotkey != Capslock
Gui, 99:Destroy
else Gui, 99:Show, x-1 y-1 +NoActivate, Dummy IJKL to Arrow Keys +CapsToCancel
return
#IfWinExist, Dummy IJKL to Arrow Keys +CapsToCancel
Capslock::return
CapsLock Up::Gui, 99:Destroy
#IfWinExist, Dummy IJKL to Arrow Keys
w::Up
a::Left
s::Down
d::Right
#IfWinExist
The top of the code is a simple updater. If you save an edit while the script is running, it autoupdates
The bottom is something to make the caps lock a 2nd layer. The cool thing about it is that if you press the caps lock, it locks the layer in. If you hold the caps lock then it doesn't lock and once you release it, it returns to the first layer
I didn't write either of these, but they are cool enough to share.