Jump to content

Recommended Posts

Posted

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
Posted

NOT TESTED...

; 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)

NEWHeader1.png

Posted (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...

; 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 by Valuater

NEWHeader1.png

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
×
×
  • Create New...