Hello all, I need some help with a script I'm writing. I want to preface this by saying that I know my script is not as condensed as it could be, I pulled it all out for troubleshooting's sake. When I run the following script, then hit the button to run button1(), it clicks then types the username that I have in there, then clicks and types it again. After a bunch of loops of this (maybe 15-20?) it goes on to type the password, then goes back to looping the click and type username. I can't figure out why this script is doing this. Help?
Thanks in advance!
Thanks in advance!
[ autoit ]
#include #include #include #include $Form1 = GUICreate( "AutoClicker" , 1000 , 100 , 192 , 124 ) $Button1 = GUICtrlCreateButton( " Start Repeating! " , 600 , 24 , 97 , 33 ) $Exit = GUICtrlCreateButton( " Exit ",700,24,97,33) $var1 = 2 HotKeySet("{ESC}","Pause") HotKeySet("{Enter}", "button1") GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = -3 Then Exit If $msg = $Exit Then Pause() Exit EndIf If $msg = $Button1 Then button1() WEnd func button1() MouseClick("left",879, 444,1,0) Send("username",1) Sleep(750) Send("{ENTER}") Sleep(750) Send("password",1) Sleep(750) Send("{ENTER}") Sleep(15000) MouseClick("left",957, 755,1,0) Sleep(5000) Send("{F9}") Sleep(10000) MouseClick("left",1258, 480,1,0) Sleep(3500) MouseClick("left",200, 173,1,0) Sleep(1000) MouseClick("left",186, 255,1,0) Sleep(1000) MouseClick("left",275, 407,1,0) Sleep(21600000) Mouseclick("left",1331, 314,1,0) Sleep(500) Send("{F1}") MouseClick("left",1362,346,1,0) Sleep(2500) Send("{F1}") MouseClick("left",1367, 333,1,0) button1() EndFunc