Jump to content
Sign in to follow this  
cammy9.9

help me plz

Recommended Posts

cammy9.9

Hi im trying to make a script that will log me in a game i play but im haveing some truble with it.

what im trying to do is when i run the script that a message box pops up and it displays some text and to textbox and a ok and exit buttons. and then after the ok button gets pressed the script will enter the text in the program that i need it for.

i need help with the messagebox and the textboxs on it and the 2 buttons and makeing the script send the text entered in the 2 textboxs

PlZ HeLp Me ;):whistle::P

Share this post


Link to post
Share on other sites
tannerli

Try something like that:

WinWaitActive("title", "text") ;Makes sure you don't send anything to the desktop or something like that
Send("!{ENTER}") ;Send Alt+Enter for pressing the OK button
GUICtrlSetData("Control ID of the text field","CUSTOM TEXT") ;Send your inputs to the field, get the Control ID with AutoIT window info

With the Win-Functions and the alt-button you can control nearly every window, if that's not enough send some screenshots of the game login window

Share this post


Link to post
Share on other sites
cammy9.9

what it is is that i dont know the code to make a messagebox to pop up when i run the script that will display a 2 textboxs and a ok button

and to make the send functon to send the text enterd in the texboxs

Share this post


Link to post
Share on other sites
stampy

Hi im trying to make a script that will log me in a game i play but im haveing some truble with it.

what im trying to do is when i run the script that a message box pops up and it displays some text and to textbox and a ok and exit buttons. and then after the ok button gets pressed the script will enter the text in the program that i need it for.

i need help with the messagebox and the textboxs on it and the 2 buttons and makeing the script send the text entered in the 2 textboxs

PlZ HeLp Me ;):whistle::P

If i understand you correctly you want a GUI with two inputs and two buttons ?

#include <GUIConstants.au3>

GUICreate(" My GUI input acceptfile", 320,120)
GUICtrlCreateLabel('some text',10,10)
$input1 = GUICtrlCreateInput ( "", 10,  30, 300, 20)
$input2 = GUICtrlCreateInput ("", 10,  55, 300, 20) 
$okbtn = GUICtrlCreateButton ("Ok", 40,  85, 60, 20)
$exitbtn = GUICtrlCreateButton ("Exit", 120,  85, 60, 20)
GUISetState () 

$msg = 0
While $msg <> $GUI_EVENT_CLOSE
       $msg = GUIGetMsg()
       Select
           Case $msg = $exitbtn
               exitloop
           Case $msg = $okbtn
               $x = GUICtrlRead($input1)
               $y = GUICtrlRead($input2)
               MsgBox(0,'',$x & @CRLF & $y)
       EndSelect
Wend

Kinda like that?

Share this post


Link to post
Share on other sites
cammy9.9

YES but how do i make the send functon send the text from the 1st textbox into the 2ed on to somethink else and the same for the 2ed

Share this post


Link to post
Share on other sites
stampy

YES but how do i make the send functon send the text from the 1st textbox into the 2ed on to somethink else and the same for the 2ed

After retreiving the text in the variable. You can use controlsend or send keys to send to another window.

Share this post


Link to post
Share on other sites
cammy9.9

so what would be the code for the send frunton to send the text from the 1st textbox on the form

send("")?

Share this post


Link to post
Share on other sites
stampy

so what would be the code for the send frunton to send the text from the 1st textbox on the form

send("")?

It would be similar to the help file...

Send("#r")
WinWaitActive("Run")
Send("notepad.exe{Enter}")
WinWaitActive("Untitled -")
Send("Today's time/date is {F5}")

;;;;;;;;;;;;;;;;;send variables instead...
Send($x)
Send($y)

except you would send the variables (strings) instead

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.