Jump to content

wanting a tooltip to show time


 Share

Recommended Posts

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?

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...