ahha Posted May 31, 2010 Share Posted May 31, 2010 Okay, newbie here. Here's the code. Pressing the Escape key exits the GUI, why? I thought only closing the GUI would generate $GUI_EVENT_CLOSE. ;test Esc causing $GUI_EVENT_CLOSE #AutoIt3Wrapper_run_debug_mode=Y ; use this to debug in console window <--- LOOK #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $hGUI = GUICreate("Example ", 500, 500) $hList = GUICtrlCreateList("", 0, 30, 500, 500, $WS_BORDER + $WS_VSCROLL) ;do NOT sort the list which is $WS_BORDER + $WS_VSCROLL $sList = GUICtrlCreateList("", 0, 0, 500, 20, $WS_BORDER + $WS_VSCROLL) ;do NOT sort the list which is $WS_BORDER + $WS_VSCROLL GUICtrlSetData($sList, "Click here .... When done press ESC.") ;set the list GUICtrlSetData($hList, "1|2|3|4|5|6|7|8|9|10||Problem is that pressing Escape exits this GUI. Why, I thought only closing (x'ing out) would do that.") ;set the list GUISetState() ;show the window Do $msg = GUIGetMsg() If $msg = $sList Then MsgBox(0+262144, "You seleted:", GUICtrlRead($sList)) EndIf If $msg = $hList Then MsgBox(0+262144, "You seleted:", GUICtrlRead($hList)) EndIf Until $msg = $GUI_EVENT_CLOSE MsgBox(0+262144, "Status:", "$GUI_EVENT_CLOSE generated.") Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 31, 2010 Moderators Share Posted May 31, 2010 (edited) OptGUICloseOnESCWhen ESC is pressed on a GUI the $GUI_EVENT_CLOSE message is sent. This option toggles this behavior on and off.1 = Send the $GUI_EVENT_CLOSE message when ESC is pressed (default).0 = Don't send the $GUI_EVENT_CLOSE message when ESC is pressed. Edited May 31, 2010 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
ahha Posted May 31, 2010 Author Share Posted May 31, 2010 SmOke_N, Thank you. I totally missed this option. I used Search in Help for "Esc" and "Escape" and didn't find it. Is there a way to dump out the entire help file so that I can brute force search for words? Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted May 31, 2010 Share Posted May 31, 2010 SmOke_N,Thank you. I totally missed this option. I used Search in Help for "Esc" and "Escape" and didn't find it. Is there a way to dump out the entire help file so that I can brute force search for words?Why would you want to do that? AutoItSetOption()/Opt() is only the fourth result, that can't be very hard to find. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
ahha Posted May 31, 2010 Author Share Posted May 31, 2010 AdmiralAlkex, You are correct - when you find it. However, this is not the first time I can't seem to find things, and a brute force search will at least let me find the items and then look them up. For another example, trying to find out if List has sort options. "list sort" in help brings up a handful of entries but even GUICtrlCreateList hides it to a newbie in the form of $LBS_SORT and does not talk about or point one to look for $WS_BORDER + $WS_VSCROLL as the key. I'm trying to avoid questions for which I can find an answer. Brute force searching for "sort" would have brought up $LBS_SORT which I see is related to GUICtrlCreateList which would have allowed me to look further on my own. That's why. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 31, 2010 Moderators Share Posted May 31, 2010 (edited) There's an online version of the help. http://www.autoitscript.com/autoit3/docs/Edit:I should have iterated that you could use Google search something like:list sort site:http://www.autoitscript.com/autoit3/docsThat may help your searching in the future.Edit2:Well, tested the theory for myself... doesn't seem that it brought up anything specific. Thought the theory was sound though lol. Edited May 31, 2010 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
MiBcho Posted June 6, 2010 Share Posted June 6, 2010 get this information, thanks. 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