RivalPS Posted February 9, 2013 Share Posted February 9, 2013 I know this is very easy for pros but i just started yesterday so anyways ^^ I have 2 input boxes in my GUI , how can i make the script sends WHATEVER you write in those input boxes forexample Send("user{TAB}pass{ENTER}") where user = whatever u wrote in input box #1 and pass = whatever u wrote in input box #2 Hope u understood what i meant , and thanks in advance Link to comment Share on other sites More sharing options...
Kyan Posted February 9, 2013 Share Posted February 9, 2013 (edited) Do you mean something like this #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 345, 39, 192, 124) $Input1 = GUICtrlCreateInput("", 8, 8, 249, 24) $Button1 = GUICtrlCreateButton("OK", 264, 8, 57, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $readInput = GUICtrlRead($Input1) If $readInput <> '' Then MsgBox(64,"Info","You wrote:"&$readInput) Else MsgBox(16,"ERROR","No text found") EndIf EndSwitch WEnd Edited February 9, 2013 by DiOgO Heroes, there is no such thing One day I'll discover what IE.au3 has of special for so many users using it.C'mon there's InetRead and WinHTTP, way better Link to comment Share on other sites More sharing options...
RivalPS Posted February 9, 2013 Author Share Posted February 9, 2013 yp u r 50% there what i need is to send the $readInput $readInput = GUICtrlRead($Input1) $readinput2 = GUICtrlRead($input2) how do i type what i got in the send() ? Send( $readinput - $readinput2 ) here is what am trying to do , this may help u understand me when u run the script u have 2 empty fields for user name and pw , u type them and then it launches a client where a user/pw are needed , it auto mouse clicks at the user field and pw field and sends whatever u wrote earlier in the empty 2 fields hope u understood me this time ^^ thnx Link to comment Share on other sites More sharing options...
HeavenlyDemon Posted February 9, 2013 Share Posted February 9, 2013 this is a silly question but bare with me is this a game client ? Link to comment Share on other sites More sharing options...
EndFunc Posted February 9, 2013 Share Posted February 9, 2013 (edited) yp u r 50% there what i need is to send the $readInput$readInput = GUICtrlRead($Input1)$readinput2 = GUICtrlRead($input2)how do i type what i got in the send() ?Send( $readinput - $readinput2 )here is what am trying to do , this may help u understand mewhen u run the script u have 2 empty fields for user name and pw , u type them and then it launches a client where a user/pw are needed ,it auto mouse clicks at the user field and pw field and sends whatever u wrote earlier in the empty 2 fieldshope u understood me this time ^^ thnxyou will have to do TWO different sends one to the Username field and one to the password field. It would be tricky because you'll also have to use send to do a TAB and things like that. I would suggest using ControlSend() for more accuracy and you can direct it to the control of your login box. You will still need to call it twice though for each input. Take a look at the help file also.e.g.ControlSend("window title", "", "contorl_id1", $username)Sleep(300)ControlSend("window title", "", "contorl_id2", $password) Edited February 9, 2013 by EndFunc EndFuncAutoIt is the shiznit. I love it. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 9, 2013 Moderators Share Posted February 9, 2013 RivalPS, Why have the script at all if all if it only repeats the values you have entered into the client inputs? Why not just enter them directly? And what sort of client is this anyway? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
RivalPS Posted February 9, 2013 Author Share Posted February 9, 2013 this is a silly question but bare with meis this a game client ?yes it's a game client Link to comment Share on other sites More sharing options...
RivalPS Posted February 9, 2013 Author Share Posted February 9, 2013 RivalPS,Why have the script at all if all if it only repeats the values you have entered into the client inputs? Why not just enter them directly? And what sort of client is this anyway? M23well , i actually thought about that xD but no harm in learning smth new right ? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 9, 2013 Moderators Share Posted February 9, 2013 RivalPS,yes it's a game clientno harm in learning smth new right ? There is when it breaks the Forum rules (there is also a link at bottom right of each page). Please read them before posting again - thread locked. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts