Sign in to follow this  
Followers 0
RivalPS

How to send input box data ?

9 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

this is a silly question but bare with me

is this a game client ?

Share this post


Link to post
Share on other sites

#5 ·  Posted (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 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.

Share this post


Link to post
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


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

this is a silly question but bare with me

is this a game client ?

yes it's a game client

Share this post


Link to post
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 ?

Share this post


Link to post
Share on other sites

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


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0