HockeyFan Posted July 19, 2005 Share Posted July 19, 2005 A couple of days ago I read a forum post that had a script that used a tooltip window to display a time counter...but now, that I would like to use it, I can no longer find that post. Is anyone familiar with this script or post who could direct me to it??? Thanks! Link to comment Share on other sites More sharing options...
/dev/null Posted July 19, 2005 Share Posted July 19, 2005 like this ??? AdlibEnable("mytooltip",100) global $glb_seconds while 1 sleep(1000) wend func mytooltip() ToolTip("This is a tooltip. Seconds: " & int($glb_seconds)) $glb_seconds += 0.1 endfunc Cheers Kurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
HockeyFan Posted July 20, 2005 Author Share Posted July 20, 2005 Kurt,If you mean this:AdlibEnable("mytooltip",100)global $glb_secondswhile 1 sleep(1000)wendfunc mytooltip() ToolTip("This is a tooltip. Seconds: " & int($glb_seconds)) $glb_seconds = $glb_seconds + 0.1endfunc...It works but It wasn't what I had found. The script that I remember counted up minutes and seconds...and I don't think it was a function call. I could be wrong......but I just don't remember. If only I hadn't deleted the code after testing it! Thanks anyway. Link to comment Share on other sites More sharing options...
Valuater Posted July 20, 2005 Share Posted July 20, 2005 found this one for ya AdlibEnable ("testmouse") $begin=0 $time=0 $MPos1 = MouseGetPos() $MPos2 = MouseGetPos() $curpos1=WinGetCaretPos() $curpos2=WinGetCaretPos() winclose("mouse") AutoItWinSetTitle ( "mouse" ) While 1 testmouse() Wend Func testmouse() If TimerStop($begin)>1000 Then $begin = TimerStart() $MPos2 = MouseGetPos() $curpos2=WinGetCaretPos() Else $MPos1 = MouseGetPos() $curpos1=WinGetCaretPos() EndIf If $MPos1[0] = $MPos2[0] and $curpos1[0]=$curpos2[0] and $curpos1[1]=$curpos2[1] Then If $time=0 Then $time = TimerStart() ToolTip("No user input for "&int(TimerStop($time)/1000)+1& " seconds", 0, 0) Else ToolTip("") $time=0 EndIf EndFunc hope it helps 8) Link to comment Share on other sites More sharing options...
/dev/null Posted July 20, 2005 Share Posted July 20, 2005 ...It works but It wasn't what I had found. The script that I remember counted up minutes and seconds...and I don't think it was a function call.O.K. so, then just extend my script to show the minutes as well. Regarding the function call: If you want the tooltip to get updated constantly, you will either do it by yourself in the message loop, or let Adlibenable() do it for you.CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
blindwig Posted July 20, 2005 Share Posted July 20, 2005 Why are you counting the seconds manually? You have no guarentee that it would be accurate. You sould be using TimerInit and TimerDiff instead. My UDF Threads:Pseudo-Hash: Binary Trees, Flat TablesFiles: Filter by Attribute, Tree List, Recursive Find, Recursive Folders Size, exported to XMLArrays: Nested, Pull Common Elements, Display 2dSystem: Expand Environment Strings, List Drives, List USB DrivesMisc: Multi-Layer Progress Bars, Binary FlagsStrings: Find Char(s) in String, Find String in SetOther UDF Threads I Participated:Base64 Conversions Link to comment Share on other sites More sharing options...
HockeyFan Posted July 20, 2005 Author Share Posted July 20, 2005 Blindwig, The timer was just something I wanted to temporarily put into a script during testing to know approximately when certain things happened during a long software installation. That's why the timer didn't need to be accurate. Thanks for your input. Link to comment Share on other sites More sharing options...
/dev/null Posted July 20, 2005 Share Posted July 20, 2005 Blindwig,The timer was just something I wanted to temporarily put into a script during testing to know approximately when certain things happened during a long software installation. That's why the timer didn't need to be accurate. Thanks for your input. <{POST_SNAPBACK}>well, why not have it more accurate ....const $INTERVAL = 100 global $glb_time = "00:00" global $glb_timestart = TimerInit() AdlibEnable("mytooltip",$INTERVAL) while 1 sleep(1000) wend func mytooltip() local $timediff = TimerDiff($glb_timestart) local $seconds $seconds = int($timediff/1000) $glb_time = StringFormat("%02d:%02d", $seconds/60, mod($seconds,60)) ToolTip("Seconds: " & $glb_time ) endfuncCheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * 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