Jump to content

Recommended Posts

Posted

Can someone write a simple script that will make my mouse constantly left click and stop and start when I hit a key, Maybe my end key? I have not done this in a while and Would appreciate any help.

Posted (edited)

I am reading the help file now trying to learn. My comprehension is poor and my english is worse.

Edited by spiderous
Posted

I am reading the help file now trying to learn. My comprehention is poor and my english is worse.

The most important thing is to try. Once you have a something that you think should work, and doesn't, post it and then ask for help.

Btw, your english is great. :shocked:

Posted

Well, I don't mind helping you cuz I have too much time on my hands.

Here is a good example:

$Boolean=False
$Sleep=100
HotKeySet("{END}","Quit")
HotKeySet("{F11}","Ac")
HotKeySet("{NUMPADADD}","SleepMinus")
HotKeySet("{NUMPADSUB}","SleepPlus")
While 1
    Sleep(1000)
WEnd
Func Ac()
    $Boolean=Not $Boolean
    While $Boolean=True
        MouseClick("left")
        Sleep($Sleep)
    WEnd
EndFunc
Func SleepPlus()
    $Sleep=$Sleep+50
    If $Sleep>=1000 Then
        $Sleep=1000
    EndIf
EndFunc
Func SleepMinus()
    $Sleep=$Sleep-50
    If $Sleep<=10 Then
        $Sleep=10
    EndIf
EndFunc
Posted (edited)

The only way I made the error go away is to remove the line of code, but now my code is like this and is not working.

Here is my code.

I just want the mouse to click superfast.

$Sleep=100
HotKeySet("{NUMPADADD}","SleepMinus")
HotKeySet("{NUMPADSUB}","SleepPlus")
While 1
    Sleep(1)
WEnd
Func Ac()
    $Boolean=Not $Boolean
    While $Boolean=True
        MouseClick("left")
        Sleep($Sleep)
    WEnd
EndFunc
Func SleepPlus()
    $Sleep=$Sleep+50
    If $Sleep>=1000 Then
        $Sleep=1000
    EndIf
EndFunc
Func SleepMinus()
    $Sleep=$Sleep-50
    If $Sleep<=10 Then
        $Sleep=10
    EndIf
EndFunc
Edited by spiderous
Posted
Posted

HotKeySet("{END}','Quit")

Notice how wen it is declaring the function Quit that it uses a ' then a " to close it. Thats a no no :shocked: change the " to ' and add it back in.

What he said it was just syntax error.
Posted

Another obvious reason it fails is there is no Quit() function in the script .....

Lol I forgot to put that in cuz I just copy off 1 of my script

Anyways as they all said add these codes at the end

Func Quit()
Exit
EndFunc
Posted

so then a good code would be this?

It starts paused and I can't unpause it.

$Boolean=False
$Sleep=100
HotKeySet("{END}','Quit")
HotKeySet("{F11}','Ac")
HotKeySet("{NUMPADADD}','SleepMinus")
HotKeySet("{NUMPADSUB}','SleepPlus")
While 1
    Sleep(1000)
WEnd
Func Ac()
    $Boolean=Not $Boolean
    While $Boolean=True
        MouseClick("left")
        Sleep($Sleep)
    WEnd
EndFunc
Func SleepPlus()
    $Sleep=$Sleep+50
    If $Sleep>=1000 Then
        $Sleep=1000
    EndIf
EndFunc
Func SleepMinus()
    $Sleep=$Sleep-50
    If $Sleep<=10 Then
        $Sleep=10
    EndIf
EndFunc

 Func Quit ()
Exit
Endfunc
Posted

Full working 1 is this.

$Boolean=False
$Sleep=100
HotKeySet("{END}","Quit")
HotKeySet("{F11}","Ac")
HotKeySet("{NUMPADADD}","SleepMinus")
HotKeySet("{NUMPADSUB}","SleepPlus")
While 1
    Sleep(1000)
WEnd
Func Ac()
    $Boolean=Not $Boolean
    While $Boolean=True
        MouseClick("left")
        Sleep($Sleep)
    WEnd
EndFunc
Func SleepPlus()
    $Sleep=$Sleep+50
    If $Sleep>=1000 Then
        $Sleep=1000
    EndIf
EndFunc
Func SleepMinus()
    $Sleep=$Sleep-50
    If $Sleep<=10 Then
        $Sleep=10
    EndIf
EndFunc

Func Quit ()
Exit
Endfunc

So you hit F11 to start/pause AC, NumpadAdd to speed up, NumpadSub to slow down, End key to exit.

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