in the following code if notepad is active
send ctrl+g
if not ctrl+s
Code: Select all
#HotIf WinActive("ahk_class Notepad")
^!+a::
{
Send "notepad"
Send "^g"
}
Code: Select all
#HotIf WinActive("ahk_class Notepad")
^!+a::
{
Send "notepad"
Send "^g"
}
Code: Select all
#HotIf !WinActive("ahk_class Notepad")
Code: Select all
^!+a:: {
Send 'notepad'
If WinActive('ahk_class Notepad')
Send '^g'
Else Send '^s'
}