Jump to content
Sign in to follow this  
cancerpuffs

Need so help

Recommended Posts

cancerpuffs

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

Share this post


Link to post
Share on other sites
Valuater

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

Share this post


Link to post
Share on other sites
cancerpuffs

Didn't seem to work.

Share this post


Link to post
Share on other sites
Valuater

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

Share this post


Link to post
Share on other sites
cancerpuffs

It stops after 3-4 clicks and finishes. I need it to loop. Also tyvm for spending your time on this.

Share this post


Link to post
Share on other sites
Valuater

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)


NEWHeader1.png

Share this post


Link to post
Share on other sites
cancerpuffs

Yeah I noticed that and fixed it, but pressing end to pause wont work (escape works tho)

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×