Jump to content

Recommended Posts

Posted

How can I change the function below, so that I am able to turn it on/off by pressing a button. Like "Pause" button for instance.

  Quote

Func clicker ()

MouseMove ( 66, 404 )

MouseClick( "left", 66, 404 )

Sleep ( 200 )

MouseMove ( 339, 404 )

MouseClick( "left", 339, 404 )

Sleep ( 200 )

MouseMove ( 613, 404 )

MouseClick( "left", 613, 404 )

Sleep ( 200 )

MouseMove ( 896, 404 )

MouseClick( "left", 896, 404 )

Sleep ( 200 )

MouseMove ( 1188, 404 )

MouseClick( "left", 118, 404 )

Sleep ( 200 )

Return

EndFunc

while (1)

clicker()

wend

Posted (edited)

Try this ;)

Global $t = 0
While 1;keeps it alive
HotKeySet("^{PAUSE}", "start");crtl + pause
HotKeySet("{PAUSE}", "stop");pause
sleep(35)
Wend



Func start ()
Do
clicker()
Until $t = 1
$t = 0
EndFunc

Func stop()
$t=1
EndFunc

Func clicker ()

MouseMove ( 66, 404 )
MouseClick( "left", 66, 404 )
Sleep ( 200 )

MouseMove ( 339, 404 )
MouseClick( "left", 339, 404 )
Sleep ( 200 )

MouseMove ( 613, 404 )
MouseClick( "left", 613, 404 )
Sleep ( 200 )

MouseMove ( 896, 404 )
MouseClick( "left", 896, 404 )
Sleep ( 200 )

MouseMove ( 1188, 404 )
MouseClick( "left", 118, 404 )
Sleep ( 200 )

EndFunc
Edited by Matrix112
Posted (edited)

  AzGuL^ said:

Thanks, but where to place it? :P I placed it at the bottom, but didn't work ;)

At the top!

And that code won't work anyway. You need an actual pause script. Unless you just want it to run when you press Pause, if that's the cause then remove the function call in the while loop.

Edited by ligenza
Posted (edited)

  ligenza said:

At the top!

And that code won't work anyway. You need an actual pause script. Unless you just want it to run when you press Pause, if that's the cause then remove the function call in the while loop.

  Quote

HotKeySet("{PAUSE}", "clicker")

Func clicker ()

... rest ofc ....

Like this? If yes, it do not work :P

EDIT; How to make it then? ;)

Edited by AzGuL^
Posted

  Matrix112 said:

Try this :mad2:

$t = 0
While 1;keeps it alive
HotKeySet("^{PAUSE}", "start");crtl + pause
HotKeySet("{PAUSE}", "stop");pause
sleep(35)
Wend
Func start ()
Do
clicker()
Until $t = 1
$t = 0
EndFunc

Func stop()
$t=1
EndFunc

Func clicker ()

MouseMove ( 66, 404 )
MouseClick( "left", 66, 404 )
Sleep ( 200 )

MouseMove ( 339, 404 )
MouseClick( "left", 339, 404 )
Sleep ( 200 )

MouseMove ( 613, 404 )
MouseClick( "left", 613, 404 )
Sleep ( 200 )

MouseMove ( 896, 404 )
MouseClick( "left", 896, 404 )
Sleep ( 200 )

MouseMove ( 1188, 404 )
MouseClick( "left", 118, 404 )
Sleep ( 200 )

EndFunc
I don't understand :P I tried it, and now it doesn't even start ;)
Posted

I edited my first post again. I wrote this in the board so there are some errors in.

This should now work. ;)

Use "Crtl + pause" to start it and "Pause" to stop it.

Posted

F1 to Pause

F2 to Exit

HotKeySet("{F1}", "ScriptPause")
HotKeySet("{F2}", "KillScript")
Global $Paused = 0

while 1
Clicker()
wend

Func clicker ()
    MouseMove ( 66, 404 )
    MouseClick( "left", 66, 404 )
    Sleep ( 200 )
    
    MouseMove ( 339, 404 )
    MouseClick( "left", 339, 404 )
    Sleep ( 200 )
    
    MouseMove ( 613, 404 )
    MouseClick( "left", 613, 404 )
    Sleep ( 200 )
    
    MouseMove ( 896, 404 )
    MouseClick( "left", 896, 404 )
    Sleep ( 200 )
    
    MouseMove ( 1188, 404 )
    MouseClick( "left", 118, 404 )
    Sleep ( 200 )
EndFunc

Func ScriptPause()
    $Paused = NOT $Paused
    While $Paused = 1
        Sleep(1000)
    WEnd
EndFunc

Func KillScript()
    Exit
EndFunc
Posted

  CWW256 said:

F1 to Pause

F2 to Exit

HotKeySet("{F1}", "ScriptPause")
HotKeySet("{F2}", "KillScript")
Global $Paused = 0

while 1
Clicker()
wend

Func clicker ()
    MouseMove ( 66, 404 )
    MouseClick( "left", 66, 404 )
    Sleep ( 200 )
    
    MouseMove ( 339, 404 )
    MouseClick( "left", 339, 404 )
    Sleep ( 200 )
    
    MouseMove ( 613, 404 )
    MouseClick( "left", 613, 404 )
    Sleep ( 200 )
    
    MouseMove ( 896, 404 )
    MouseClick( "left", 896, 404 )
    Sleep ( 200 )
    
    MouseMove ( 1188, 404 )
    MouseClick( "left", 118, 404 )
    Sleep ( 200 )
EndFunc

Func ScriptPause()
    $Paused = NOT $Paused
    While $Paused = 1
        Sleep(1000)
    WEnd
EndFunc

Func KillScript()
    Exit
EndFunc
Working one, thank you very much! ;)
Posted (edited)

This should work too. Now i testet it. ;)

Global $t = 0
HotKeySet("!{PAUSE}", "clicker");Alt + pause
HotKeySet("{PAUSE}", "stop");pause
HotKeySet("!{ESC}", "End");Alt + esc  
While 1;keeps it alive
sleep(100)
Wend

Func stop()
$t=1
EndFunc

Func clicker()
Do
MouseMove ( 66, 404 )
MouseClick( "left", 66, 404 )
Sleep ( 200 )

MouseMove ( 339, 404 )
MouseClick( "left", 339, 404 )
Sleep ( 200 )

MouseMove ( 613, 404 )
MouseClick( "left", 613, 404 )
Sleep ( 200 )

MouseMove ( 896, 404 )
MouseClick( "left", 896, 404 )
Sleep ( 200 )

MouseMove ( 1188, 404 )
MouseClick( "left", 118, 404 )
Sleep ( 200 )
Sleep(20)
Until $t = 1
$t = 0
EndFunc

Func End ()
    Exit
EndFunc
Edited by Matrix112

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...