Wildcard or matching 2 ahk_class

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Kagerjay
Posts: 9
Joined: 04 Nov 2017, 08:57
Contact:

Wildcard or matching 2 ahk_class

16 Nov 2017, 15:46

I used winspy to grab an ahk_class for my autohotkey macro. Sometimes that application has 2+ ahk_classes associated with that program

Example:

Code: Select all

HwndWrapper[program.exe;;1111-1111]
HwndWrapper[program.exe;;2222-2222]
How can I use winNotExist to simply just match both names? Or perhaps use a `||`, `OR` etc?

E.g.

Code: Select all

+F16::
IfWinNotExist, ahk_class HwndWrapper[program.exe;;1111-1111]
    Run, program.exe
GroupAdd, kjexplorers16, ahk_class HwndWrapper[program.exe;;1111-1111]
if WinActive("ahk_exe program.exe")
    GroupActivate, kjexplorers16, r
else
    WinActivate ahk_class HwndWrapper[program.exe;;1111-1111]
Return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: fiendhunter and 232 guests