AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Cannot recreate GUI after closing it

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
albedoa



Joined: 18 May 2008
Posts: 18

PostPosted: Thu Jul 03, 2008 4:28 pm    Post subject: Cannot recreate GUI after closing it Reply with quote

This is driving me nuts. This script brings up a tooltip menu when ctrl+` is hit. From there, you can hit 1 to begin another process I haven't implemented yet. Then you can press ctrl+` again to close that process and bring the menu back up. This goes fine until you just want to close the menu, so you hit escape. The escape key closes the Main window as it is supposed to, but the WinWait command does not realize it for some reason.

The strange part to me is that the escape key is seemingly attempting to close the Main window the same way that hitting 1 would. Any ideas?

Code:
Hotkey IfWinExist, Main
Hotkey 1, CIVREntry
Hotkey IfWinExist, Main
Hotkey esc, End



LCtrl & `::

Gui 6:Destroy
Gui Show,, Main
ToolTip 1: CIVR Entry`n2: Book Entry`n3: Reset Entry`n4: Time Entry, 0, 0

SetTitleMatchMode 2
WinWait Macro

ToolTip
WinClose Main
return



CIVREntry:
Gui 6:Show,, CIVR Entry Macro
return



End:
ToolTip
Gui 6:Show,, End Macro
Gui 6:Destroy
return
Back to top
View user's profile Send private message
Razlin



Joined: 05 Nov 2007
Posts: 395
Location: canada

PostPosted: Thu Jul 03, 2008 8:08 pm    Post subject: Reply with quote

Code:
6GuiEscape:
return

should stop your gui from closing on escape key
_________________
-=Raz=-
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group