Jump to content
Sign in to follow this  
fred5460

wanting a tooltip to show time

Recommended Posts

fred5460

hey i have a game that runs in full screen mode and i want to be able to see a tooltip with a current time of HH:MM:SS in that format, also refreshing every second, and having the ability to "hide" and unhide by the press of a button, i cant even get the dang script to show a tooltip with time... this is what i have so far

HotKeySet("{F2}", "TogglePause")
Func TogglePause()
        sleep(100)
        ToolTip('_NowTime"',0,0)
EndFunc

can someone plz help me?

Share this post


Link to post
Share on other sites
greenmachine

I'm not sure if it's going to show up inside the game, but I can help you on this part. _NowTime is a function, which means that it needs to have (). In other words, _NowTime() is the correct call to that function. Since it is a UDF (user-defined function), it requires including another file that contains the function _NowTime(). In this case, it is date.au3. So you need to put "#include <date.au3>" (without the quotes) at the top of your script before you run it.

Oh right, one more thing: I suggest looking in the helpfile for more information - this function has an optional parameter that the helpfile would mention that may come in handy for you.

Edited by greenmachine

Share this post


Link to post
Share on other sites
skippynz

hey i have a game that runs in full screen mode and i want to be able to see a tooltip with a current time of HH:MM:SS in that format, also refreshing every second, and having the ability to "hide" and unhide by the press of a button, i cant even get the dang script to show a tooltip with time... this is what i have so far

HotKeySet("{F2}", "TogglePause")
Func TogglePause()
        sleep(100)
        ToolTip('_NowTime"',0,0)
EndFunc

can someone plz help me?

this should do the trick - im using beta 105 though

use F2 to start displaying the time, and F3 to stop it.

will just sit in the tasktray until you exit it.

but not sure if it will display when you have the game running in full screen

#include <date.au3>

HotKeySet("{F2}", "TogglePause")
HotKeySet("{F3}", "TogglePause1")

while 1
    sleep(100)
WEnd

Func TogglePause()
While 1
ToolTip( _NowTime(5) , 0 , 0)
sleep(1000)
WEnd
EndFunc

Func TogglePause1()
While 1
ToolTip( "" , 0 , 0)
WEnd
EndFunc
Edited by craig.gill

Share this post


Link to post
Share on other sites
fred5460

thanks the tooltip does show, but it flickers and slows down the process speed... is there another option to project and update itself automatically every second?

Share this post


Link to post
Share on other sites
greenmachine

Use an adlib function?

AdlibEnable ("RefreshCurrentTime", 1000)

; main script

Func RefreshCurrentTime()

ToolTip( _NowTime(5), 0, 0)

EndFunc

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.