Ignore window if it has opened a modal window when using WinTitle

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
TheoG
Posts: 18
Joined: 18 Sep 2023, 05:14

Ignore window if it has opened a modal window when using WinTitle

02 May 2024, 07:25

Hi,

I'm using GroupAdd and GroupActivate to switch between windows matching an ahk_exe criterion.

I would like to exclude windows from this group if they have a modal window opened and only include the modal window or the frontmost window.

Thank you
User avatar
mikeyww
Posts: 28870
Joined: 09 Sep 2014, 18:38

Re: Ignore window if it has opened a modal window when using WinTitle

02 May 2024, 08:29

Hello,

Perhaps the command's "R" mode will work for you.
TheoG
Posts: 18
Joined: 18 Sep 2023, 05:14

Re: Ignore window if it has opened a modal window when using WinTitle

03 May 2024, 10:59

I'm already using it but it is not enough
User avatar
mikeyww
Posts: 28870
Joined: 09 Sep 2014, 18:38

Re: Ignore window if it has opened a modal window when using WinTitle

03 May 2024, 11:13

If you have a script that does not work, I recommend posting your script so that forum readers can examine and test it. This is preferably a script that demonstrates the problem when it is run. Posting your script may enable more specific feedback. Include a detailed description of what the script currently does, and what it should do instead. An example also helps.
TheoG
Posts: 18
Joined: 18 Sep 2023, 05:14

Re: Ignore window if it has opened a modal window when using WinTitle

03 May 2024, 11:16

Problem solved, thank you mike

Code: Select all

mylist := WinGetList("ahk_exe my.exe")
GroupAdd("dev", "ahk_id " . mylist[1])

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: DavidP, mikeyww, TomDonovan, vanove and 98 guests