Jump to content

How to send input box data ?


RivalPS
 Share

Recommended Posts

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

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 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
happy.png

Link to comment
Share on other sites

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

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

you 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 by EndFunc
EndFuncAutoIt is the shiznit. I love it.
Link to comment
Share on other sites

  • Moderators

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? :huh:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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? :huh:

M23

well , i actually thought about that xD but no harm in learning smth new right ?

Link to comment
Share on other sites

  • Moderators

RivalPS,

yes it's a game client

no 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. :naughty:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...