cammy9.9 Posted October 31, 2006 Share Posted October 31, 2006 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 Link to comment Share on other sites More sharing options...
tannerli Posted October 31, 2006 Share Posted October 31, 2006 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 More sharing options...
cammy9.9 Posted October 31, 2006 Author Share Posted October 31, 2006 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 Link to comment Share on other sites More sharing options...
stampy Posted October 31, 2006 Share Posted October 31, 2006 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 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 More sharing options...
cammy9.9 Posted October 31, 2006 Author Share Posted October 31, 2006 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 Link to comment Share on other sites More sharing options...
stampy Posted October 31, 2006 Share Posted October 31, 2006 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 2edAfter 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 More sharing options...
cammy9.9 Posted October 31, 2006 Author Share Posted October 31, 2006 so what would be the code for the send frunton to send the text from the 1st textbox on the form send("")? Link to comment Share on other sites More sharing options...
stampy Posted October 31, 2006 Share Posted October 31, 2006 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 More sharing options...
cammy9.9 Posted October 31, 2006 Author Share Posted October 31, 2006 Ok Thank you very mush ) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now