Get help with using AutoHotkey and its commands and hotkeys
5 posts • Page 1 of 1
Is there any way to close 2 guis at once? For example i have two Guis that are stacked so the bottom one can be click through and my top Gui has my menu functions. is there any way i can close/hide them both at once with a menu button? when i try it only hides the active gui. thank you!
Just have the routine Cancel both GUIs like this:
Code: Select all
Menu, FileMenu, Add, Close, CloseGUIs Menu, MenuBar, Add, File, :FileMenu Gui, Main:Add, Text,, My GUI Gui, Main:Menu, MenuBar Gui, Second:Color, White Gui, Second:Add, Text, y200, Secondary GUI Gui, Second:Show, x500 y600 w300 h300 Gui, Main:Show, x500 y500 w300 h100 return CloseGUIs: Gui, Main:Cancel Gui, Second:Cancel MsgBox, Both Gui's are closed but script is still running ExitApp return
Thank you for your reply but that did not work. I did however figure it out myself by utilizing both "gui hide" to hide my active gui then winclose to hide the second one.
Why wouldn’t that work? The demo script itself works. Did you run that and see how it works? You just need to use the proper GUI labels with Gui Cancel.
lol damn i feel like an idiot now, no i did not use the proper labels