Jump to content

Pausing a countdown?


Delta01
 Share

Recommended Posts

Hi,

Well, I'm making a script that counts down from a time which the end user inputs. I use TimerInit() for the timer function and I got it working.

I want to make a pause function, how would I do that? I can't use the sleep() function because I have various countdowns running simultaneously.

Here is my timer function, what can I do to pause only this specific timer (remember I have up to 7 running at once)

This sets the timer

Func SetupUser1()
    $User1 = InputBox("User's name", "Enter the user's name below.", "BoT90210")
    $Count1 = InputBox("Time paid for", "How many hours did " & $User1 & " pay for?", "2")
    $number1 = $Count1 * 3600000
    $Gold1 = InputBox("Amount paid", "How much gold did they pay you?", "100,000")
    $Msg1 = MsgBox(4, "Set up complete", "The set up for user: " & $User1 & " is complete." & @CRLF & @CRLF & "Do you wish to start the timer?")
    If $Msg1 = 6 Then
        GUICtrlDelete($Add1)
        $LabelUser1 = GUICtrlCreateLabel($User1, 10, 45)
        $User1Gold = GUICtrlCreateLabel($Gold1, 155, 45)
        GUICtrlSetColor($User1Time, 0x000000)
        $timer = TimerInit()
        $bRunTimer1 = 1
    ElseIf $Msg1 = 7 Then
        Sleep(500)
    EndIf
EndFuncoÝ÷ Ù8¦z¶®¶­sdgVæ2FÖW#¢b33c¶FÖUFôvòÒb33c¶çVÖ&W#ÒçBFÖW$Ffbb33c·FÖW"¢õF6·5FõFÖRb33c¶FÖUFôvòÂb33c´÷W"Âb33c´Öç2Âb33cµ6V72¢6öç6öÆUw&FRb33c·FÖW"fײ5$Äb¢6öç6öÆUw&FRFÖW$Ffbb33c·FÖW"fײ5$Äb¢Æö6Âb33c·5FÖRÒb33cµFÖR¢b33cµFÖRÒ7G&ætf÷&ÖBgV÷C²S&¢S&¢S&gV÷C²Âb33c´÷W"Âb33c´Öç2Âb33cµ6V72¢bb33c·5FÖRfÇC²fwC²b33cµFÖRFVâ6öçG&öÅ6WEFWBgV÷CµF67&BgV÷C²ÂgV÷C²gV÷C²ÂgV÷Cµ7FF3gV÷C²Âb33cµFÖR bb33c¶FÖUFôvòfÇC³ÒFVà 6öçG&öÅ6WEFWBgV÷CµF67&BgV÷C²ÂgV÷C²gV÷C²ÂgV÷Cµ7FF3gV÷C²ÂgV÷C³££gV÷C² bb33c¶FÖUFôvòfÇC³ÒFVâb33c¶%'VåFÖW#Ò VæF` VæDgVæ

Thanks, I hope you can help!!

Edited by Delta01
Link to comment
Share on other sites

  • 2 weeks later...

here is an example to of 1 of my script

hotkeyset("{pause}","pause");
$pause=-1
sleep(100)
$pause= NOT $pause
;-----------------
Func pause()
$pause=NOT $pause
While $pause
tooltip("Paused",0,0)
sleep(10)
WEnd
Tooltip("")
EndFunc

Func end ()
    Exit
EndFunc

[center]dbod.rar player created by auto3.0Visit Topic here==>[font="Arial Black"]CLICK HERE[/font]<==PovClipse tutorial:Similar to auto it , with this you can make anything[/center]

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