Info Posted July 21, 2007 Share Posted July 21, 2007 How can I do that if I push "{Escape}", it will automatic exit my GUI? Please answer me. Link to comment Share on other sites More sharing options...
Helge Posted July 21, 2007 Share Posted July 21, 2007 Fast question....hmm, I'm sure you mean you want a fast answer, but you wont get one. Pressing escape in a active GUI sends the $GUI_EVENT_CLOSE message at default (can be toggled with GUICloseOnESC), which is also sent when clicking the close-button in a GUI, so you just need to check for that message. #include <GUIConstants.au3> GUICreate("", 300, 300) GUISetState() While 1 $nMsg = GUIGetMsg() If $nMsg = $GUI_EVENT_CLOSE Then Exit WEnd If you would like to close the GUI and/or script even when the GUI is inactive then look up HotKeySet. Link to comment Share on other sites More sharing options...
Info Posted July 22, 2007 Author Share Posted July 22, 2007 Dude, I just want that if I push a button, like {Esc}, it will automatic exit my script, even if the script is minimized. I don't understand what you just gave to me. Link to comment Share on other sites More sharing options...
Xand3r Posted July 22, 2007 Share Posted July 22, 2007 HotKeySet("{ESC}" , "doesc") Func doesc() EXIT EndFunc Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro Link to comment Share on other sites More sharing options...
Helge Posted July 22, 2007 Share Posted July 22, 2007 (edited) Dude, I just want that if I push a button, like {Esc}, it will automatic exit my script, even if the script is minimized.I don't understand what you just gave to me.Don't you dude me. You said you wanted the GUI to be closed when you pressed escape.You didn't say anything about if the GUI had to be active or not, but I gave you solutionsto both scenarios."Pressing escape in a active GUI sends the $GUI_EVENT_CLOSE...so you just need to check for that message.""If you would like to close the GUI and/or script even when the GUI is inactive then look up HotKeySet."You now say you wanted the script to be closed even when the GUI was inactive and since Iin the first part of my post explained how to do it when the GUI was active you should've justignored that part... Instead you should follow my second suggestion... looking up HotKeySet.Did you do that? Somehow I doubt it. Edited July 22, 2007 by Helge Link to comment Share on other sites More sharing options...
Info Posted July 25, 2007 Author Share Posted July 25, 2007 (edited) HotKeySet("{ESC}" , "doesc") Func doesc() EXIT EndFuncThanks, working. =) And, 1 more question: How I do that if I prees 2 keys it will exit the script, like "HotKeySet("{ESC}" & "{Shift}" , "doesc") ____Func doesc() ____EXIT ____EndFunc"? Don't you dude me. You said you wanted the GUI to be closed when you pressed escape. You didn't say anything about if the GUI had to be active or not, but I gave you solutions to both scenarios."Pressing escape in a active GUI sends the $GUI_EVENT_CLOSE...so you just need to check for that message.""If you would like to close the GUI and/or script even when the GUI is inactive then look up HotKeySet."You now say you wanted the script to be closed even when the GUI was inactive and since I in the first part of my post explained how to do it when the GUI was active you should've just ignored that part... Instead you should follow my second suggestion... looking up HotKeySet. Did you do that? Somehow I doubt it.I don't even have power to commant this. Edited July 25, 2007 by Info Link to comment Share on other sites More sharing options...
Info Posted July 30, 2007 Author Share Posted July 30, 2007 Up, answer me please. Link to comment Share on other sites More sharing options...
MrCreatoR Posted July 30, 2007 Share Posted July 30, 2007 I don't even have power to commant this.So why you even post here? on that one you have "power"?The man is trying to help you, and you say you not have "power" to read what he wrote?How I do that if I prees 2 keys it will exit the scriptIn that case, i say RTFM! (help file) P.SIf you need help, you learn how to get (ask) it, else... you don't get it.  Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1  AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ==================================================    AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
Info Posted July 30, 2007 Author Share Posted July 30, 2007 So why you even post here? on that one you have "power"?The man is trying to help you, and you say you not have "power" to read what he wrote?In that case, i say RTFM! (help file) P.SIf you need help, you learn how to get (ask) it, else... you don't get it.He didn't helped me at all. Link to comment Share on other sites More sharing options...
Helge Posted July 30, 2007 Share Posted July 30, 2007 He didn't helped me at all.Define "help".If you mean by giving you the complete code that you wanted, then no, I didn't help you.When the person asking the question haven't shown much effort I prefer to tell them whereand how they can solve it by themselves, and I think I did a good job in this case. If you hadopened the helpfile and looked at the suggested functions I'm sure you would've solved yourproblem by now. Link to comment Share on other sites More sharing options...
ashley Posted July 30, 2007 Share Posted July 30, 2007 Thanks, working. =)And, 1 more question:How I do that if I prees 2 keys it will exit the script,like "HotKeySet("{ESC}" & "{Shift}" , "doesc")____Func doesc()____EXIT____EndFunc"?I don't even have power to commant this.try thisHotKeySet("{ESC}" & "{Shift}" , "close")Func close()exitEndFuncthis should work... Free icons for your programs Link to comment Share on other sites More sharing options...
Toady Posted July 30, 2007 Share Posted July 30, 2007 Up, answer me please. lol www.itoady.com A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding Link to comment Share on other sites More sharing options...
ashley Posted July 30, 2007 Share Posted July 30, 2007 lollol is that all u can do horror Free icons for your programs Link to comment Share on other sites More sharing options...
Richard Robertson Posted July 30, 2007 Share Posted July 30, 2007 Shift Escape is "+{ESC}". That is the hotkey you would want. 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