Jump to content

help me plz


 Share

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
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
 Share

  • Recently Browsing   0 members

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