Jump to content
Sign in to follow this  
alesyt0h

Repeating click actions every X minutes?

Recommended Posts

alesyt0h

Hello all! Sorry for my english, I'm using Google Translate :D

I have a question about script... I need to make an action repeat every 13 minutes, but with the loop runing.. see my script:

global $Paused
global $cnt = 1 ;variable declaration
global $z = 0

HotKeySet("{ESC}", "Terminate")
Sleep(5000)

MouseClick("left", 1073, 307, 200)

While 1
MouseClick("left", 1052, 550, 3)
Sleep(1000)
MouseClick("left", 1052, 550, 3)
Sleep(1000)
MouseClick("left", 1052, 550, 3)
Sleep(1000)
MouseClick("left", 1052, 550, 3)
MouseClick("left", 1168, 452, 1)
WEnd

Func Terminate() ; the exit function
Exit 0
EndFunc

I need to every 13 minutes, make the first click: MouseClick("left", 1073, 307, 200) ... but I don't know how to do this action :D

Someone can help me with this please?

Thank you in advance!!

Regards!

Edited by alesyt0h

Share this post


Link to post
Share on other sites
Andreik

global $Paused
global $cnt = 1 ;variable declaration
global $z = 0

HotKeySet("{ESC}", "Terminate")
AdlibRegister("MyFunc",780000)    ; 780000 ms = 13 min
Sleep(5000)

MouseClick("left", 1073, 307, 200)

While 1
    MouseClick("left", 1052, 550, 3)
    Sleep(1000)
    MouseClick("left", 1052, 550, 3)
    Sleep(1000)
    MouseClick("left", 1052, 550, 3)
    Sleep(1000)
    MouseClick("left", 1052, 550, 3)
    MouseClick("left", 1168, 452, 1)
WEnd

Func MyFunc()    ; This function is called every 13 min
    MouseClick("left", 1073, 307, 200)
EndFunc

Func Terminate() ; the exit function
    Exit 0
EndFunc

Edited by Andreik

When the words fail... music speaks

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.