AutoHotkey Community

It is currently May 26th, 2012, 1:33 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: May 31st, 2005, 2:55 pm 
Offline

Joined: February 26th, 2005, 5:36 am
Posts: 21
I am trying to detect how a window was closed. For example I have a form I made as a splash screen with two buttons, aggree, disaggree which I have working fine. However if the user simply closes the window using the red X or other method how can I detect that even?

Thx

K

... I found a way around this a bit, but would still like to know if its possible to trap those events and if so wehre do I need to RTFM?'


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 31st, 2005, 4:21 pm 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
Currently AutoHotkey is unable to detect events such as closing a window, so this wouldn't be possible.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 1st, 2005, 6:37 am 
Offline
User avatar

Joined: December 29th, 2004, 1:28 pm
Posts: 2542
To detect if the window was closed without pressing one of the buttons you might be able to use a timer with IfWinExist. If the window does not exist and a value was not set by one of the buttons then an alternate method of closing the window was likely used. Alternately, using an always on top toolwindow might be an option...


Report this post
Top
 Profile  
Reply with quote  
PostPosted: June 1st, 2005, 9:24 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
valenfor wrote:
I have a form I made as a splash screen with two buttons
Assuming this window was created with the GUI command, there are a few options:

1) Use Gui -SysMenu to avoid having an X button in the title bar (use -Caption if you don't want a title bar at all).

2) Leave the X button present but distinguish between events:

GuiClose:
MsgBox You must press one of the buttons.
; And leave the window open to force a choice.
return

ButtonAgree:
Gui Cancel ; Hide the window.
MsgBox The installation will now proceed.
return

ButtonDisagree:
ExitApp


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Newl, poserpro, SifJar and 16 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group