Sign in to follow this  
Followers 0
HockeyFan

Tooltip Help

8 posts in this topic

:)

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! :evil:

Share this post


Link to post
Share on other sites



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 *

Share this post


Link to post
Share on other sites

Kurt,

If you mean 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 = $glb_seconds + 0.1

endfunc

...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! :evil:

Thanks anyway. :D

Share this post


Link to post
Share on other sites

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)


NEWHeader1.png

Share this post


Link to post
Share on other sites

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

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 *

Share this post


Link to post
Share on other sites

Why are you counting the seconds manually? You have no guarentee that it would be accurate. You sould be using TimerInit and TimerDiff instead.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 )

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 *

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