Jump to content
Sign in to follow this  
vkey

Run part of script every hour

Recommended Posts

vkey

This is my scipt, the first part has to run continuously, the second part only every hour after starting.

Like: Start script, 60 min running normal script, run part2 for a minute, 60 min normal script......

While 1
    
WEnd

Func PressMouseButtons1();; Normal running scipt
While 1
    MouseClick("left", 80, 100, 1, 0)
;;blabla...
WEnd
EndFunc

Func PressMouseButtons2();; Part of the script to run every hour after starting

    MouseClick("left", 80, 100, 1, 0)
;;blabla...

EndFunc

I hope you understand this and you can help me to fix it. :)

Share this post


Link to post
Share on other sites
Paulie

AdLibEnable()

Or you can do a TimerInit() and in the loop check if it's been an hour

Edited by Paulie

Share this post


Link to post
Share on other sites
vkey

Thanks, so it should be like this?

While 1
    
WEnd

Func PressMouseButtons1();; Normal running scipt
While 1
    AdlibEnable("myadlib", 3600)
    MouseClick("left", 80, 100, 1, 0)
;;blabla...
WEnd
EndFunc

Func myadlib();; Script running every hour
   MouseClick("left", 80, 100, 1, 0)
;;blabla...
EndFunc

Share this post


Link to post
Share on other sites
Authenticity

Nope ^^.

$Interval = 60000 ;1000 ms = second

AdlibEnable('myadlib', $Interval * 60)

Share this post


Link to post
Share on other sites
Hawkwing

It should be like this:

CODE
While 1

WEnd

Func PressMouseButtons1();; Normal running scipt

While 1

AdlibEnable("myadlib", 3600000)

MouseClick("left", 80, 100, 1, 0)

;;blabla...

WEnd

EndFunc

Func myadlib();; Script running every hour

MouseClick("left", 80, 100, 1, 0)

;;blabla...

EndFunc

The way you have it the second part will run every 3.6 seconds.


The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.

Share this post


Link to post
Share on other sites
vkey

Of course, stupid me! :)

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  

×