cancerpuffs Posted June 13, 2008 Share Posted June 13, 2008 I just need to know to make it so if I press home it starts and if I press end it ends (never coded b4). $answer = MsgBox(4, "AutoIt clicker", " Run?") If $answer = 7 Then MsgBox(0, "AutoIt clicker", "OK. Bye") Exit EndIf $Tal = 0 While $Tal < 100 MouseDown("left") MouseUp("left") Sleep (1500) MouseDown("left") MouseUp("left") Sleep (1500) If $Tal = 100 Then MsgBox(0, "AutoIt Script", "Finished!") Exit EndIf If Send("{HOME}") Then $Tal = $Tal + 100 exit endif WEnd Link to comment Share on other sites More sharing options...
Valuater Posted June 13, 2008 Share Posted June 13, 2008 NOT TESTED... expandcollapse popup; Press Esc to terminate script Global $Paused, $Runner, $Tal HotKeySet("{ESC}", "Terminate") HotKeySet("{HOME}", "ShowMe") HotKeySet("{END}", "StopMe") ;Shift-Alt-d $answer = MsgBox(4, "AutoIt clicker", " Run?") If $answer = 7 Then MsgBox(0, "AutoIt clicker", "OK. Bye") Exit EndIf While 1 If $Runner = 1 Then MouseDown("left") MouseUp("left") Sleep(1500) MouseDown("left") MouseUp("left") Sleep(1500) If $Tal = 100 Then MsgBox(0, "AutoIt Script", "Finished!") Exit EndIf If Send("{HOME}") Then $Tal = $Tal + 100 Exit EndIf EndIf Sleep(100) WEnd Func Terminate() Exit 0 EndFunc ;==>Terminate Func StopMe() $Runner = 0 EndFunc ;==>StopMe Func ShowMe() $Runner = 1 EndFunc ;==>ShowMe 8) Link to comment Share on other sites More sharing options...
cancerpuffs Posted June 13, 2008 Author Share Posted June 13, 2008 Didn't seem to work. Link to comment Share on other sites More sharing options...
Valuater Posted June 13, 2008 Share Posted June 13, 2008 (edited) Didn't seem to work. There seemed to be an extra "exit" that you put in there Be sure to press HOME to start try this... expandcollapse popup; Press Esc to terminate script Global $Paused, $Runner, $Tal HotKeySet("{ESC}", "Terminate") HotKeySet("{HOME}", "ShowMe") HotKeySet("{END}", "StopMe") $answer = MsgBox(4, "AutoIt clicker", " Run?") If $answer = 7 Then MsgBox(0, "AutoIt clicker", "OK. Bye") Exit EndIf While 1 If $Runner = 1 Then MouseDown("left") MouseUp("left") Sleep(1500) MouseDown("left") MouseUp("left") Sleep(1500) If $Tal = 100 Then MsgBox(0, "AutoIt Script", "Finished!") Exit EndIf If Send("{HOME}") Then $Tal = $Tal + 100 ;Exit EndIf EndIf Sleep(100) WEnd Func Terminate() Exit 0 EndFunc ;==>Terminate Func StopMe() $Runner = 0 EndFunc ;==>StopMe Func ShowMe() $Runner = 1 EndFunc ;==>ShowMe 8) Edited June 13, 2008 by Valuater Link to comment Share on other sites More sharing options...
cancerpuffs Posted June 13, 2008 Author Share Posted June 13, 2008 It stops after 3-4 clicks and finishes. I need it to loop. Also tyvm for spending your time on this. Link to comment Share on other sites More sharing options...
Valuater Posted June 13, 2008 Share Posted June 13, 2008 you have $Tal = $Tal + 100 then when it try's to loop again you have If $Tal = 100 Then MsgBox(0, "AutoIt Script", "Finished!") Exit ..... Thats why 8) Link to comment Share on other sites More sharing options...
cancerpuffs Posted June 13, 2008 Author Share Posted June 13, 2008 Yeah I noticed that and fixed it, but pressing end to pause wont work (escape works tho) 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