Jump to content

Timer Pause


Recommended Posts

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.

Link to comment
Share on other sites

  • Moderators

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

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.

Link to comment
Share on other sites

  • 2 months later...

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.

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