lolp1 Posted March 29, 2007 Share Posted March 29, 2007 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? Link to comment Share on other sites More sharing options...
xcal Posted March 29, 2007 Share Posted March 29, 2007 Really depends on what you're doing... For $i = 5 To 1 Step -1 ConsoleWrite(@LF & $i) Sleep(1000) Next ConsoleWrite(@LF) How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
Cyber Posted March 29, 2007 Share Posted March 29, 2007 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 Link to comment Share on other sites More sharing options...
lolp1 Posted March 29, 2007 Author Share Posted March 29, 2007 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..) Link to comment Share on other sites More sharing options...
Cyber Posted March 29, 2007 Share Posted March 29, 2007 Ok 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 Link to comment Share on other sites More sharing options...
lolp1 Posted March 29, 2007 Author Share Posted March 29, 2007 HotKeySet({ESC},"stopIT")Global $stopVariable= 0$sleep = 3000$time = TimerInit()do ;******** time time time timeuntil TimerDiff($time) >= $sleep OR $stopVariable= 1Func stopIT() $stopVariable= 1endFuncStill 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. Link to comment Share on other sites More sharing options...
Cyber Posted March 29, 2007 Share Posted March 29, 2007 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 Link to comment Share on other sites More sharing options...
lolp1 Posted March 29, 2007 Author Share Posted March 29, 2007 Thanks. Thats the perfect example Link to comment Share on other sites More sharing options...
Cyber Posted March 29, 2007 Share Posted March 29, 2007 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 Link to comment Share on other sites More sharing options...
Uten Posted March 29, 2007 Share Posted March 29, 2007 Ohh, no offense, but thats what I call a real spoon feeding.. Well done @Cyber.. Keep on learning @lolp1... Happy Scripting to all of you! Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now