jackyyll Posted April 5, 2005 Share Posted April 5, 2005 Sorry for all the questions.. but how do i make the text in an input box into variables? this is what i have.. GuiCtrlCreateInput("$X", 10, 70, 30, 20) GuiCtrlCreateInput("$Y", 45, 70, 30, 20) Link to comment Share on other sites More sharing options...
zcoacoaz Posted April 5, 2005 Share Posted April 5, 2005 you have to assign the input box to a variable $Input1 = GuiCtrlCreateInput ( blah, blah, blah ) then you retrieve information by using GuiCtrlRead like this GUiCtrlRead ( $Input1 ) [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
jackyyll Posted April 5, 2005 Author Share Posted April 5, 2005 So like this? (gawd im such a noob ) expandcollapse popup;Constants #include <GUIConstants.au3> ;GUI Variables Global $GUIWidth Global $GUIHeight $GUIWidth = 250 $GUIHeight = 250 ;Create Window GUICreate("Theivory Bot V0.1", $GUIWidth, $GUIHeight) ;Create Tabs GuiCtrlCreateTab(0, 0, 255, 255) GuiCtrlCreateTabItem("Main") GuiCtrlCreateGroup("Cordinates", 5, 25) GuiCtrlCreateLabel("Cordinates of team leader:", 10, 40, 150, 20) GuiCtrlCreateLabel("X", 20, 55) GuiCtrlCreateLabel("Y", 55, 55) $X = GuiCtrlCreateInput("", 10, 70, 30, 20) GUiCtrlRead ( $X ) $Y = GuiCtrlCreateInput("", 45, 70, 30, 20) GUiCtrlRead ( $Y ) GuiCtrlCreateLabel("Press the Home key to start the bot", 100, 100) GuiCtrlCreateLabel("Press the End key to stop the bot", 110, 110) ;Set State GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then EXIT WEnd ;Hotkeys HotKeySet("{HOME}", "_IfActive") HotKeySet("{END}", "_NotActive") ;Check if Monster & Me exists If WinActive("Monster&Me - MythOfOrient") Then _IfActive() Else _NotActive() EndIf ;Start Bot Func _IfActive() Send('{F9}') MouseMove($X, $Y, 0) Endfunc ;End Bot Func _NotActive() Endfunc Link to comment Share on other sites More sharing options...
CyberSlug Posted April 5, 2005 Share Posted April 5, 2005 FAQ #9..... drop the quotes: http://www.autoitscript.com/autoit3/docs/faq.htm#9 Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
SlimShady Posted April 5, 2005 Share Posted April 5, 2005 @jackyyll You really need to study and understand your code. Link to comment Share on other sites More sharing options...
jpm Posted April 5, 2005 Share Posted April 5, 2005 So like this?(gawd im such a noob )GuiCtrlCreateLabel("X", 20, 55) GuiCtrlCreateLabel("Y", 55, 55) $X = GuiCtrlCreateInput("", 10, 70, 30, 20) GUiCtrlRead ( $X ) $Y = GuiCtrlCreateInput("", 45, 70, 30, 20) GUiCtrlRead ( $Y )<{POST_SNAPBACK}>This part of the script is bad GuiCtrlRead should be call when some event/msg are received not at definition time.More the result need to be stored in a variable as $Xvalue= GUICtrlRead($X)$X is not the value but the controlidentifier which allow to retrieve the value 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