Sign in to follow this  
Followers 0
lolp1

How to get current sleep time left?

10 posts in this topic

Well, basicly I wan;t to be able to obtain the current sleep time.

For example: Sleep(3000) , I wan't to some how display the current sleep time left in some sort of format. (Mst likley seconds:milliseconds)

How am I able to get the current sleep time left and store it as a value some where?

Share this post


Link to post
Share on other sites



You can't

but you can use

$time = TimerInit()
TimerDiff($time)oÝ÷ Ùú+{¦¦WºÚ"µÍÌÍÝ[YHH[Y[]

BÂ^]
    ][ÝÕ[YHÝ ][ÝË  ÌÍÝ[YKJB[[[YY    ÌÍÝ[YJH  ÝÏHÌ

Console Browse: Navigate on the WEB in a textual consoleMultiPing!: Show computer on the lan and/or show the local/remote task, ALL animated!KillaWin: Event executingCryptPage: Crypt your webpage and show only with key

Share this post


Link to post
Share on other sites

If it's not possible then my next best optoion would be to make some sort of a 'Stop watch' type deal.

How ever either of the past two examples show a reasonable way to do that. (Or I am just confused, which is likley..)

Share this post


Link to post
Share on other sites

Ok :whistle:

HotKeySet({ESC},"stopIT")

Global $stopVariable= 0
$sleep = 3000


$time = TimerInit()
do
    ;******** time time time time
until TimerDiff($time) >= $sleep OR $stopVariable= 1


Func stopIT()
  $stopVariable= 1
endFunc

Console Browse: Navigate on the WEB in a textual consoleMultiPing!: Show computer on the lan and/or show the local/remote task, ALL animated!KillaWin: Event executingCryptPage: Crypt your webpage and show only with key

Share this post


Link to post
Share on other sites

HotKeySet({ESC},"stopIT")

Global $stopVariable= 0

$sleep = 3000

$time = TimerInit()

do

;******** time time time time

until TimerDiff($time) >= $sleep OR $stopVariable= 1

Func stopIT()

$stopVariable= 1

endFunc

Still rather unsure of this. The idea is to have a 'Count down' environment. For example I want a 5 minute count down. (Perhaps as a tool tip) and it counts down in seconds.

Share this post


Link to post
Share on other sites

yes, I undestand, this is an example for see the time remaning.

ook, this is countDown

$title= "CountDown"
HotKeySet("{ESC}","stopIT")

Global $stopVariable= 0

$count = inputBox($title,"The seconds to countDown")
$sleep= $count * 1000


$time = TimerInit()
do
    TrayTip($title,"Seconds remaning: " & Round(($sleep - TimerDiff($time))/1000),1)
    Sleep(100)
until TimerDiff($time) >= $sleep OR $stopVariable= 1

if $stopVariable= 1 Then
    TrayTip("","",1)
    MsgBox(16,$title, "Count down stopped!")
Else
    MsgBox(0,$title, "Time!")
EndIf

Func stopIT()
  $stopVariable= 1
endFunc

Console Browse: Navigate on the WEB in a textual consoleMultiPing!: Show computer on the lan and/or show the local/remote task, ALL animated!KillaWin: Event executingCryptPage: Crypt your webpage and show only with key

Share this post


Link to post
Share on other sites

Thanks. Thats the perfect example :whistle:

Share this post


Link to post
Share on other sites

:whistle:

well


Console Browse: Navigate on the WEB in a textual consoleMultiPing!: Show computer on the lan and/or show the local/remote task, ALL animated!KillaWin: Event executingCryptPage: Crypt your webpage and show only with key

Share this post


Link to post
Share on other sites

Ohh, no offense, but thats what I call a real spoon feeding..:D

Well done @Cyber..:whistle:

Keep on learning @lolp1...:P

Happy Scripting to all of you!

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