Jump to content

while/wend


Recommended Posts

hi i need help on a script,

Func exitthescript()
    Exit
EndFunc

HotKeySet( "e", "exitthescript" )

  While 1
;MouseClick("left", x, y, Number click, speed,)



MouseClick("left",1437,500)
Sleep(1000) 
Send("{space}",0)




WEnd

i need this script to run for 15mins every 45mins any help would b grate, sorry if somthing like this has been posted

regards

bigal

Link to comment
Share on other sites

Take a look at TimerInit and TimerDiff.

e.g.

$start = TimerInit()

Loop

If TimerDiff($start) >= (1000 * 60 * 45) Then

Exitloop

$start = TimerInit()

Loop

Your script

Until TimerDiff($start) >= (1000 * 60 * 15) Then

go back to the pause timerloop

This is pseudo code but i think the idea is clear :unsure:

Edited by Arterie
Link to comment
Share on other sites

Like Arterie already stated:

Func exitthescript()
    Exit
EndFunc

HotKeySet( "e", "exitthescript" )

While 1
  $t = timerInit()

  While 1
    MouseClick("left",1437,500)
    Sleep(1000) 
    Send("{space}",0)
    If TimerDiff($t) > 15*60*1000 Then ExitLoop
  WEnd
  Sleep(45 * 60 * 1000)
Wend
Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]
Link to comment
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
 Share

  • Recently Browsing   0 members

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