myxomatosii Posted February 25, 2009 Share Posted February 25, 2009 (edited) hi guys, i am working on writing a script to automate a browser game, i am pretty new to gui's (i wrote my first one yesterday with help from this forum), I'll post my code then tell you what I was trying to do. dim $nl1, $nl2, $nl3, $nl4, $info1, $info2, $info3, $info4 Func cityinput() GuiCreate("city ID's.") GuiSetState(@SW_Show) GuiCtrlCreateLabel("Input City1 ID Here.",20,10) $info1=GUICtrlCreateInput($nl1,20,30,100,20) GuiCtrlCreateLabel("Input City2 ID Here.",20,60) $info2=GUICtrlCreateInput($nl2,20,80,100,20) GuiCtrlCreateLabel("Input City3 ID Here",150,10) $info3=GuiCtrlCreateInput($nl3,150,30,100,20) GUICtrlCreateLabel("Input City4 ID Here.",150,60) $info4=GuiCtrlCreateInput($nl4,150,80,100,20) Sleep(10000) MsgBox(0,"test",$info1 & $info2 & $info3 & $info4,0) EndFunc cityinput() ok i wanted to make a gui that stayed up for a few seconds (i'll figure out how to make it wait for me later) while i input the numbers 1, 2, 3, 4 in their respective boxes $info1,$info2,$info3,$info4 i made a msgbox to return values in order to test the results i was going to get to see if i was doing it right however the msgbox returns 46810 every time instead of 1234, what am i doing wrong? my ultimate goal for this concept is to use the GUI to *extract* the cityids from the browser, or memory or however i figure out to do it Edited February 25, 2009 by myxomatosii Link to comment Share on other sites More sharing options...
enaiman Posted February 25, 2009 Share Posted February 25, 2009 Try GuiCtrlRead($info1) instead $info1 is the handle of the control while GuiCtrlRead($info1) is the value typed inside ... no worries - it happened to alot of people Guess it is the most frequent mistake. SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
myxomatosii Posted February 25, 2009 Author Share Posted February 25, 2009 dim $nl, $nl2, $nl3, $nl4, $info1, $info2, $info3, $info4 Func cityinput() GuiCreate("Ikariam City ID's.") GuiSetState(@SW_Show) GuiCtrlCreateLabel("Input City1 ID Here.",20,10) $info1=GUICtrlCreateInput($nl,20,30,100,20) GuiCtrlCreateLabel("Input City2 ID Here.",20,60) $info2=GUICtrlCreateInput($nl2,20,80,100,20) GuiCtrlCreateLabel("Input City3 ID Here",150,10) $info3=GuiCtrlCreateInput($nl3,150,30,100,20) GUICtrlCreateLabel("Input City4 ID Here.",150,60) $info4=GuiCtrlCreateInput($nl4,150,80,100,20) Sleep(10000) MsgBox(0,"test",GuiCtrlRead($info1) & GuiCtrlRead($info2) & GUICtrlRead($info3) & GuiCtrlRead($info4),0) EndFunc cityinput() fixed! works. how would i go about making it wait for my input instead of giving myself only 5 seconds? perhaps by creating a button to select when all are finished, or a checkbox by each other than that i am boggled at how i would extract information from the browser, but i guess that is a different topic needing more description 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