matrix10657 Posted December 29, 2006 Share Posted December 29, 2006 I'm trying to make a gui that will allow you to enter in a bunch of different information. On this gui there will be an execute button, when it is pressed a pre-written script will go and at the appropriate times I want the data previously entered in the gui to be typed by auto it. #include <GuiConstants.au3> GuiCreate(".bot", 400, 400) $name1 = GuiCtrlCreateInput("Name", 50, 50, 130, 20) $gobutton = GuiCtrlCreateButton("Go!", 10, 330, 100, 30) GUISetState() while 1 sleep (5000) wend This is where I left off on my gui. I want to beable to enter 'bob' into my input box and when I press 'Go!' .... expandcollapse popupmouseclick ("left",502,187,1,0) mouseclick ("left",440,209,1,0) mouseclick ("left",218,200,1,0) mouseclick ("left",163,166,1,0) mouseclick ("left",66,142,1,0) mouseclick ("left",283,306,1,0) mouseclick ("left",610,210,1,0) mouseclick ("left",633,117,1,0) mouseclick ("left",656,117,1,0) mouseclick ("left",713,332,1,0) mouseclick ("left",273,321,1,0) mouseclick ("left",555,466,1,0) sleep (500) pixelsearch (306,379,308,381,0xFFFFFF) if @error Then sleep (500) mouseclick ("left",323,380,1,0) EndIf if not @error then mouseclick ("left",323,380,1,0) EndIf mouseclick ("left",28,555,1,0) sleep (400) mousemove (99,467,2) mouseclick ("left",120,447,1,2) mouseclick ("left",439,44,5,.5) mouseclick ("left",281,216,1,0) sleep (5000) pixelsearch (379,42,381,44,0xFFFFFF) if @error Then $do = 0 Else $do = 1 EndIf Do sleep (500) pixelsearch (379,42,381,44,0xFFFFFF) if @error Then $do = 0 Else $do = 1 EndIf until $do = 0 sleep (200) mouseclick ("left",352,285,1,1) sleep (200) mouseclick ("left",107,136,1,0) mousemove (258,205,0) send ("{BS 16}") send("GUICtrlRead($name1)") Right at this part I would like it to send ("bob"). However, I do not know The correct way to format the gui and the script. Thanks in advance Link to comment Share on other sites More sharing options...
Helge Posted December 29, 2006 Share Posted December 29, 2006 Very logical...you have the GUICtrlRead in quotes, meaning it will become a string. Remove the quotes and voila ! Link to comment Share on other sites More sharing options...
matrix10657 Posted December 29, 2006 Author Share Posted December 29, 2006 any idea how I would make the 'go!' button commence the script? Link to comment Share on other sites More sharing options...
dandymcgee Posted December 29, 2006 Share Posted December 29, 2006 Ok... now you're double posting. ARG!!! You're confusing the hell outta me dude. Just post once if you make a mistake and put it in the wrong section, just ask politely for the MODS to move it to the correct place. I left a reply in your other post:http://www.autoitscript.com/forum/index.ph...mp;#entry287556 - Dan [Website] Link to comment Share on other sites More sharing options...
Helge Posted December 29, 2006 Share Posted December 29, 2006 (edited) Here's on quick way of doing it... Replace the While/WEnd-loop in your first part with this code :While 1 $iMsg = GUIGetMsg() If $iMsg = $gobutton Then _GoBob() WEndoÝ÷ Ù8^¶¬yÊ'v«¶ò¢êܡעØb±û§rب«¢+ÙÕ¹}½ ½ ¤($ìÑ¥½¹Ì)¹Õ¹Btw, do you use notepad as your editor ? If you do I would suggest you to use Scite4AutoItinstead. Also, you might want to check out GUIGetMsg some more as well, if you want to closethe script by pressing the X in titlebar.EDIT : Even if your life depends on it, there's never a reason to doublepost ! Edited December 29, 2006 by Helge Link to comment Share on other sites More sharing options...
dandymcgee Posted December 29, 2006 Share Posted December 29, 2006 Nicely put Helge. hehe - Dan [Website] Link to comment Share on other sites More sharing options...
matrix10657 Posted December 29, 2006 Author Share Posted December 29, 2006 I know.. I realised it wasn't in the right forum but I couldnt delete my old post. Sry 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