autocomplex 0 Posted September 5, 2007 (edited) $SelectList = GUICtrlCreateList("", 48, 88, 121, 77, -1, 0) GUICtrlSetData(-1, "1. Auto Fighter|2. Power Cutter|3. Power Fisher|4. Power Miner") Global $selection = 0 Global $selectiondecipher = GUICtrlRead($SelectList) Func Selection() While 1 $msg = GUIGetMsg Select Case $msg = $NextButton $username = GUICtrlRead($UsernameInput) $password = GUICtrlRead($PasswordInput) If $selectiondecipher = "1. Auto Fighter" Then $selection = 1 Endif If $selectiondecipher = "2. Power Cutter" Then $selection = 2 Endif If $selectiondecipher = "3. Power Fisher" Then $selection = 3 Endif If $selectiondecipher = "4. Power Miner" Then $selection = 4 Endif EndSelect Wend EndFunc This is what I'm trying to do, but it says error. I read the help file and it said I should use GUICtrlRead, but GUICtrlRead doesn't work with GUICtrlSetData. Any help would be greatly appreciated. =) Edited September 5, 2007 by inline853 Want Runescape Specific Scripts and Bots?Visit AutoIt Runescape Team (ARST) forum! Share this post Link to post Share on other sites
autocomplex 0 Posted September 5, 2007 help! =) Want Runescape Specific Scripts and Bots?Visit AutoIt Runescape Team (ARST) forum! Share this post Link to post Share on other sites
Valuater 130 Posted September 5, 2007 Like this.... #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) Share this post Link to post Share on other sites
autocomplex 0 Posted September 5, 2007 but im using Global $selectiondecipher = GUICtrlRead($SelectList) to get $selectiondecipher as a variable representing text, andf it isn't working. how can i get the variable to = the text? that was my question. or what my question was supposed to be. Want Runescape Specific Scripts and Bots?Visit AutoIt Runescape Team (ARST) forum! Share this post Link to post Share on other sites
maqleod 1 Posted September 5, 2007 this what you're looking for? expandcollapse popup#include <GuiConstants.au3> #include <GUIList.au3> $parent = GUICreate("List",400,200) $SelectList = GUICtrlCreateList("", 10, 10, 121, 77, -1, 0) GUICtrlSetData($SelectList,"1. Auto Fighter|2. Power Cutter|3. Power Fisher|4. Power Miner") GuiCtrlCreateLabel("Username",150,10,50,25) GuiCtrlCreateLabel("Password",150,40,50,25) $UsernameInput = GuiCtrlCreateInput("",200,10,100,20) $PasswordInput = GuiCtrlCreateInput("",200,40,100,20) $NextButton = GuiCtrlCreateButton("Select",150,100,75,25) Global $selection = 0 Global $selectiondecipher = GUICtrlRead($SelectList) GUISetState() Do $msg = GUIGetMsg() Select Case $msg = $NextButton $username = GUICtrlRead($UsernameInput) $password = GUICtrlRead($PasswordInput) $selectedindex = _GUICtrlListSelectedIndex($SelectList) $selected = _GUICtrlListGetText($SelectList,$selectedindex) If $selected = "1. Auto Fighter" Then $selection = 1 Endif If $selected = "2. Power Cutter" Then $selection = 2 Endif If $selected = "3. Power Fisher" Then $selection = 3 Endif If $selected = "4. Power Miner" Then $selection = 4 Endif MsgBox(0,"Selected","You selected " & $selected) EndSelect Until $msg = $GUI_EVENT_CLOSE GUIDelete() [u]You can download my projects at:[/u] Pulsar Software Share this post Link to post Share on other sites
autocomplex 0 Posted September 5, 2007 i get this ... $selectedindex = _GUICtrlListSelectedIndex($SelectList) $selectedindex = ^ ERROR Want Runescape Specific Scripts and Bots?Visit AutoIt Runescape Team (ARST) forum! Share this post Link to post Share on other sites
maqleod 1 Posted September 5, 2007 i get this ... $selectedindex = _GUICtrlListSelectedIndex($SelectList) $selectedindex = ^ ERROR you need to make sure to add the include: #include <GUIList.au3> [u]You can download my projects at:[/u] Pulsar Software Share this post Link to post Share on other sites
autocomplex 0 Posted September 5, 2007 k it works now ... thanks for your help. =) Want Runescape Specific Scripts and Bots?Visit AutoIt Runescape Team (ARST) forum! Share this post Link to post Share on other sites
autocomplex 0 Posted September 5, 2007 (edited) now when i click the $NextButton, it doesn't open the other GUI. I set it up like this ... Func Selection() While 1 $selectedindex = _GUICtrlListSelectedIndex($SelectList) $selected = _GUICtrlListGetText($SelectList,$selectedindex) $msg = GUIGetMsg() Select Case $msg = $NextButton $username = GUICtrlRead($UsernameInput) $password = GUICtrlRead($PasswordInput) If $selected = "1. Auto Fighter" Then $selection = 1 Endif If $selected = "2. Power Cutter" Then $selection = 2 Endif If $selected = "3. Power Fisher" Then $selection = 3 Endif If $selected = "4. Power Miner" Then $selection = 4 Endif EndSelect WendoÝ÷ Ù«¢+Ù%ÀÌØíͱѥ½¸ôÀQ¡¸(%U%MÑMÑÑ¡M]}M!=¤)¹¥)%ÀÌØíͱѥ½¸±ÐìÐìÀQ¡¸(%U%±Ñ ÀÌØí5¥¸¤)¹¥oÝ÷ ÚØb²+-¢^Ø^¢Ø^¬ejëh×6If $selection = 4 then GUISetState(@SW_SHOW);<== Sets the GUI to be Visible endif It is supposed to open another GUI when the user selects the 4th option. In this process it also shuts itself down. Any help? Edited September 5, 2007 by inline853 Want Runescape Specific Scripts and Bots?Visit AutoIt Runescape Team (ARST) forum! Share this post Link to post Share on other sites
autocomplex 0 Posted September 5, 2007 help ... Want Runescape Specific Scripts and Bots?Visit AutoIt Runescape Team (ARST) forum! Share this post Link to post Share on other sites
maqleod 1 Posted September 6, 2007 are you trying to open a child gui? that is probably what you need to do if I am understanding correctly. it would help if you posted your code in it's entirety. [u]You can download my projects at:[/u] Pulsar Software Share this post Link to post Share on other sites