igorm Posted August 28, 2008 Share Posted August 28, 2008 Hi, I'm trying to create counter for my tool which will start counting when some action starts. It's format should be 00:00:00. I have no idea how to start with this, so can somebody help me with it. Only thing I figured is that I need to use AdlibEnable. Thanks in advance for any help. Cheers Office 2000/XP/2003/2007 Slipstreamer Link to comment Share on other sites More sharing options...
rasim Posted August 28, 2008 Share Posted August 28, 2008 igorm#include <GUIConstants.au3> #include <Date.au3> Global $sTimer, $Dll_Timer, $hour, $min, $sec $hGUI = GUICreate("Test", 150, 70, -1, -1) $label = GUICtrlCreateLabel("00:00:00", 50, 15, 100, 20) GUISetState() $begin = TimerInit() AdlibEnable("SetTime", 1000) While 1 Switch GUIGetMsg() Case -3 ExitLoop EndSwitch WEnd Func SetTime() Local $time = _TicksToTime(Int(TimerDiff($begin)), $hour, $min, $sec) ControlSetText($hGUI, "", $label, StringFormat("%02i:%02i:%02i", $hour, $min, $sec)) EndFunc Link to comment Share on other sites More sharing options...
igorm Posted August 28, 2008 Author Share Posted August 28, 2008 Wow, this was really fast. Thank you very much. Works great. Cheers Office 2000/XP/2003/2007 Slipstreamer 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