In autohotkey's #IfWinActive statement, is it possible to specify multiple criteria? specifically, ahk_class and ahk_exe? eg, something similar to

#IfWinActive ahk_exe test.exe && ahk_class Test
; window specific stuff
#IfWinActive ; Test

Within the WinTitle parameter you can specify more than one criterion for narrowing down the search of a specific window. See Multiple Criteria.

#IfWinActive ahk_exe test.exe ahk_class Test

    ; window specific definition of hotkeys or/and hotstrings

#IfWinActive ; turn off context sensitivity


    IfWinActive ahk_exe test.exe ahk_class Test
    ; do window specific stuff


  • Never thought it's that simple. I've tried similar form but with comma in between. Thx a lot! Saved my day. – qeatzy Dec 12 '17 at 8:48
  • Saved my day here too! I have been looking into matching by a bit of Win-Title and the ahk_exe. Used it in Groupadd, and it worked very well! – llinfeng Jan 20 '19 at 17:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.