Page 1 of 1

How to activate the desired window if both windows have the same ahk_class?

Posted: 23 Oct 2019, 01:37
by reluct
I usually use the command #IfWinActive ahk_class.
I can’t use the Title Process ID PID since they change after the action in the windows.

Re: How to activate the desired window if both windows have the same ahk_class?

Posted: 23 Oct 2019, 02:04
by AHKStudent

Re: How to activate the desired window if both windows have the same ahk_class?

Posted: 23 Oct 2019, 02:34
by reluct
#IfWinActive [, WinText]
or

Code: Select all

#IfWinActive ahk_class QWidget, Browser
1::
Send 2
Return
not work

Re: How to activate the desired window if both windows have the same ahk_class?  Topic is solved

Posted: 23 Oct 2019, 06:34
by DRocks
Maybe consider RegEx SetTitleMatchMode and use a RegEx WinTitle plus the ahk_class ?

Re: How to activate the desired window if both windows have the same ahk_class?

Posted: 23 Oct 2019, 13:01
by reluct
DRocks wrote:
23 Oct 2019, 06:34
Maybe consider RegEx SetTitleMatchMode and use a RegEx WinTitle plus the ahk_class ?
thx :D