JWoodruff Posted September 5, 2007 Share Posted September 5, 2007 Hello Again, Ok I have created dynamic menu items that are read from an ini. problem now is that when they are clicked I need the text value of that item in order to continue. Is there an easy way to get that value? I have attempted using GUICtrlRead(menucontrolvalue) no luck. Thanks - Woody Link to comment Share on other sites More sharing options...
autocomplex Posted September 5, 2007 Share Posted September 5, 2007 i have like the smae problem, but im using a Listbox. Want Runescape Specific Scripts and Bots?Visit AutoIt Runescape Team (ARST) forum! Link to comment Share on other sites More sharing options...
JWoodruff Posted September 5, 2007 Author Share Posted September 5, 2007 i have like the smae problem, but im using a Listbox.GUICtrlRead(LISTBOXCONTROL) will return the value at the index in that listbox (e.g user clicks third item in list then clicks button) - Woody Link to comment Share on other sites More sharing options...
autocomplex Posted September 5, 2007 Share Posted September 5, 2007 doesn't work because of GUICtrlSetData Want Runescape Specific Scripts and Bots?Visit AutoIt Runescape Team (ARST) forum! Link to comment Share on other sites More sharing options...
JWoodruff Posted September 5, 2007 Author Share Posted September 5, 2007 Got a code sample? - Woody Link to comment Share on other sites More sharing options...
Valuater Posted September 5, 2007 Share Posted September 5, 2007 ??? #include <GUIConstants.au3> GUICreate("") $SelectList = GUICtrlCreateList("", 48, 88, 121, 77, -1, 0) GUICtrlSetData(-1, "1. Auto Fighter|2. Power Cutter|3. Power Fisher|4. Power Miner") GUISetState() While 1 $msg = GUIGetMsg() If $msg = $SelectList Then MsgBox(0x0, "test", GUICtrlRead($SelectList), 2) If $msg = -3 Then Exit WEnd 8) Link to comment Share on other sites More sharing options...
martin Posted September 5, 2007 Share Posted September 5, 2007 Hello Again, Ok I have created dynamic menu items that are read from an ini. problem now is that when they are clicked I need the text value of that item in order to continue. Is there an easy way to get that value? I have attempted using GUICtrlRead(menucontrolvalue) no luck. ThanksDon't know how to read the text, though I'm sure it's possible. But if you don't get a solution then if you are creating the menus from an ini file then you must be using the text when you generate the menu, so could you just save that in an array with the menu item ids? $Mi[$n][0] = GuiCtrlCreateMenuItem($text,... $Mi[$n][1] = $text Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
autocomplex Posted September 5, 2007 Share Posted September 5, 2007 i have a post with the code samples ... Want Runescape Specific Scripts and Bots?Visit AutoIt Runescape Team (ARST) forum! Link to comment Share on other sites More sharing options...
JWoodruff Posted September 6, 2007 Author Share Posted September 6, 2007 Don't know how to read the text, though I'm sure it's possible. But if you don't get a solution then if you are creating the menus from an ini file then you must be using the text when you generate the menu, so could you just save that in an array with the menu item ids? $Mi[$n][0] = GuiCtrlCreateMenuItem($text,... $Mi[$n][1] = $text Thanks Martin! Looks like that's the way to go. - Woody 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