RichardDouwes Posted January 21, 2005 Share Posted January 21, 2005 This might be a stupid question (I'm new), but is there a way to stop ESC from sending the $GUI_EVENT_CLOSE message? I believe I read somewhere that the AutoIt GUI is basically a dialog, so an ESC *should* send a CLOSE message, but if it wouldn't, the GUI would look a bit more like a "real" window. Again, maybe this is a stupid question, but a normal/"real" window shouldn't close with just an ESC, should it? (Try it...) Thanks, Richard Link to comment Share on other sites More sharing options...
therks Posted January 21, 2005 Share Posted January 21, 2005 HotKeySet('{ESC}', 'DummyFunc') Func DummyFunc() ; Do nothing, or maybe something depending on what you want EndFunc That will catch the escape key and keep it from sending to your GUI. The only problem is that this catches the key whether the GUI is focussed or not. You'd best have a loop checking to see if your GUI window is active, and if it is then set the hotkey, and if not then unset it. My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
RichardDouwes Posted January 21, 2005 Author Share Posted January 21, 2005 Thanks. Would be nice to have some kind op AutoItSetOption() though... Richard Link to comment Share on other sites More sharing options...
Administrators Jon Posted January 21, 2005 Administrators Share Posted January 21, 2005 Thanks. Would be nice to have some kind op AutoItSetOption() though...RichardI agree. I'll add a GUICloseOnESC or something option. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
RichardDouwes Posted January 21, 2005 Author Share Posted January 21, 2005 I agree. I'll add a GUICloseOnESC or something option.<{POST_SNAPBACK}>Thanks you very much!!!Richard Link to comment Share on other sites More sharing options...
Administrators Jon Posted January 21, 2005 Administrators Share Posted January 21, 2005 It is done. Opt("GUICloseOnESC", 0) Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now