Sign in to follow this  
Followers 0
ScripterDude

Timer Pause

3 posts in this topic

Hello all,

I am currently converting over my Kixtart "Tip of the Day" script to AutoIT and could you some assistance. Just a quick app synopsis: Script pauses for 1 minute the displays a "Tip of the Day" for 7 seconds then automatically closes. The issue I am having is that I need a PAUSE button function that will halt the automatic exit of the script. Basically I want the the "Tip of the Day" to start a count down when run, after the countdown, automatically close. If the user clicks the Pause button, it will suspend the countdown indefinately and they will be able to close by using the normal window close X button.

Share this post


Link to post
Share on other sites



$Timer = TimerInit()
While 1
   If TimerDiff($Timer) / 1000 >= 7 Then
        MsgBox(0, 'Timer', 'Time is up, now exiting', 1)
        Exit
    EndIf
WEnd
Maybe that will give you some ideas...


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Func pause()

ProcessWait ( "ScripterDude");providing no process named ScripterDude exists

EndFunc

Assigning your pause button to this Func will stop the script indefinately thus leaving the only option to be to close it out.

Hello all,

I am currently converting over my Kixtart "Tip of the Day" script to AutoIT and could you some assistance. Just a quick app synopsis: Script pauses for 1 minute the displays a "Tip of the Day" for 7 seconds then automatically closes. The issue I am having is that I need a PAUSE button function that will halt the automatic exit of the script. Basically I want the the "Tip of the Day" to start a count down when run, after the countdown, automatically close. If the user clicks the Pause button, it will suspend the countdown indefinately and they will be able to close by using the normal window close X button.

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  
Followers 0