I have two windows with the same ahk_class so I needed to a way differentiate the two and maximise one of them.
My script has a message box that outputs the ahk_id and Win title.
Message box shows one of the windows has the Win title "Custom Filter -Occurence List - Q-Pulse"
I want to maximise this specific window.
I tried to make a script based on what I could find online but its not working. Is there a way to maximise this window in my script below?
Appreciated and thanks for your help!
J
--------------------------------------------------------------------------------------------------------
Code: Select all
#UseHook On
WinGet, MyWindows, List, ahk_class WindowsForms10.Window.8.app.0.2eed1ca_r9_ad1
Loop, % MyWindows
{
ThisWindow := MyWindows%A_Index%
WinActivate, ahk_id %ThisWindow%
WinGetTitle, MyWinTitle, ahk_id %ThisWindow%
MsgBox, 64, Window Activated, % "Win ID: " ThisWindow "`nTitle: " MyWinTitle
If MyWinTitle = Custom Filter - Occurence List - Q-Pulse
{
WinMaximize, Custom Filter -Occurence List - Q-Pulse ; This line of code was supposed to maximise the window with that title. TBH I made this line up, so i dont even know if its correct syntax.
}
else WinMinimize, %ThisWindow% ; Also made this one up. Its to minimise all other windows which dont share the same title
}
return