I am not that good at AHK, so there might be a lot of improvement that can be made, but at least it hasn't failed me yet
Code: Select all
#NoEnv
#Warn
SendMode Input
SetWorkingDir %A_ScriptDir%
#SingleInstance,Force
#Hotstring EndChars ; Only Space triggers hotstrings
; Finding ahk_class - Have at least one script running, right click the green H icon in system tray and click on Window Spy.
; ahk_class is found in the top box. (Hex of color under mouse pointer is found in the Mouse Position box)
::stop::
IfWinActive, ahk_class Notepad
send in the name of love.
Else IfWinActive, ahk_class SciTEWindow
send Hammertime{!}
Else IfWinActive, ahk_class Qt5152QWindowIcon
send {raw} \command{}
Else IfWinActive, ahk_class SunAwtFrame
MsgBox You are typing jibberish while Pycharm is active.
Else
send stop{Space}
return