toggle window doesnt work

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
aliztori
Posts: 119
Joined: 19 Jul 2022, 12:44

toggle window doesnt work

Post by aliztori » 26 Nov 2022, 08:49

why is function not working

Code: Select all

ToggleWin(WinTitle) 
{
	if WinActive(WinTitle) 
		WinMinimize, % WinTitle
	Else
		WinActivate, % WinTitle

}

When I press the Hotkey, it Runs windows, but will not Show after Minimized when I press the Hotkey again..
I see the Taskbar show windows, but never does the windows open..

teadrinker
Posts: 4358
Joined: 29 Mar 2015, 09:41
Contact:

Re: toggle window doesnt work

Post by teadrinker » 26 Nov 2022, 08:54

Perhaps when you minimize the window, it is still active.
Last edited by teadrinker on 26 Nov 2022, 08:55, edited 1 time in total.

aliztori
Posts: 119
Joined: 19 Jul 2022, 12:44

Re: toggle window doesnt work

Post by aliztori » 02 Dec 2022, 04:40

teadrinker wrote:
26 Nov 2022, 08:54
Perhaps when you minimize the window, it is still active.
what should i do ?

teadrinker
Posts: 4358
Joined: 29 Mar 2015, 09:41
Contact:

Re: toggle window doesnt work

Post by teadrinker » 02 Dec 2022, 05:27

Check if a window is minimized or not using WinGet.

Post Reply

Return to “Ask for Help (v1)”