Jump to content

enable/disable loop - how to?


Recommended Posts

Hi

lets suppose i've autoit latest beta installed and i that I want to control a loop via trayicon. how can i stop/resume anytime this loop?

Also is it possible when i stop/resume it to change tray icon?

thx again for your kindness :">

EDIT: solved :)

Edited by mirkocosta
Link to comment
Share on other sites

HotKeySet("{PAUSE}", "_pause")
Global $_x
_loop()
Func _loop()
    While 1
        SplashTextOn("Test","1",50,50,-1,-1,"")
        sleep(2)
        SplashTextOn("Test","9999999",50,50,-1,-1,"")
        sleep(2)
        SplashOff()
        $_x = 1
    wend
EndFunc

func _pause()
HotKeySet("{PAUSE}", "_unpause")
    while $_x = 1
        sleep(3)
    wend
endfunc

func _unpause()
    $_x = 2
    HotKeySet("{PAUSE}", "_pause")
    return
endfunc

if i understand you correctely this is what you looking for a loop pause! maybe it can be better than this but it work well.

GreenseedMCSE+I, CCNA, A+Canada, QuebecMake Love Around You.

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