This works fine for minimizing a Google Chrome window that might be open
WinGet nChromeWindows, Count, ahk_class Chrome_WidgetWin_1
WinMinimize ahk_class Chrome_WidgetWin_1
But this will not work for maximizing a Google Chrome window that might be minimized.
WinGet nChromeWindows, Count, ahk_class Chrome_WidgetWin_1
WinMaximize ahk_class Chrome_WidgetWin_1
What am I doing wrong? Thanks
Maximize a Chrome window that might be minimized
-
- Posts: 6
- Joined: 07 Mar 2017, 11:59
Re: Maximize a Chrome window that might be minimized
Just use "WinActivate, Chrome"
Re: Maximize a Chrome window that might be minimized
Thanks, I tried that on this screen and it did not work. I minimized this screen and ran "WinActivate, Chrome" and it did not come back up. I did a WinGetTitle on this screen and it did have the word "Chrome" in the window title.
Re: Maximize a Chrome window that might be minimized
Try:
Code: Select all
WinRestore, ahk_class Chrome_WidgetWin_1
WinMaximize, ahk_class Chrome_WidgetWin_1
Re: Maximize a Chrome window that might be minimized
Thanks, this is better but I still have an issue. I am starting to figure out there is a difference between a window being minimized and a window being covered by another window. Your solution works if the Google Chrome window is minimized but if it was covered over by another window it does not work. Is there something I can add to this or change so that the Chrome window is put on top for both cases?
Re: Maximize a Chrome window that might be minimized
You could try:
You could also check the state of the window first with:
But i dont think its needed.
Code: Select all
WinRestore, ahk_class Chrome_WidgetWin_1
Winactivate, ahk_class Chrome_WidgetWin_1
WinMaximize, ahk_class Chrome_WidgetWin_1
Code: Select all
WinGet, OutputVar, MinMax, WinTitle
Re: Maximize a Chrome window that might be minimized
That did it!! Perfect. Thank you
Who is online
Users browsing this forum: No registered users and 70 guests