i am trying to get this gui to set the hotkey times pressed counter to 0 after i pressed minimize but i cant get it done i keep having to press my hotkey twice to get it to pop up again (after i used minimize). what am i missing here? is it not possible to do this in a function?
Code: Select all
#SingleInstance, Force
LWin::
hotkeygui++
if hotkeygui = 1
{
Gui,1: +Owner +AlwaysOnTop
Gui,1: Add, Button, x0 y0 w200 h30 , Button
Gui,1: Show, w200 h30, Test GUI
Gui,1: Submit, NoHide
OnMessage(0x112, "WM_SYSCOMMAND")
return
}
else if hotkeygui = 2
{
Gui,1: Destroy
hotkeygui = 0
return
}
GuiClose:
ExitApp
WM_SYSCOMMAND(wMessage)
{
If wMessage = 61472
{
Gui,1: Destroy
hotkeygui = 0
return
}
}