Use autohotkey for text expansion on Windows
Posted on March 13, 2020 (Last modified on July 11, 2024) • 1 min read • 113 wordsUnder macOS I use TextExpander, under Windows there’s the fantastic AutoHotkey. One of the few softwares I can’t live without.
This is my default configuration:
; ---------- "auto reload" ----------
FileGetTime ScriptStartModTime, %A_ScriptFullPath%
SetTimer CheckReload, 1000, 0x7FFFFFFF ; ms & priority
; from here: https://stackoverflow.com/a/45488494
CheckReload() {
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"
}
}
; ---------- actual content here ----------
; removed all my email address shortcuts ...
:*:-dt::
; from here: https://is.gd/3u6MKQ
Send, %A_YYYY%-%A_MM%-%A_DD%
Return
:*://ts::
Send, %A_YYYY%%A_MM%%A_DD%_%A_Hour%%A_Min%%A_Sec%
Return