Precise
Joined: 30 Dec 2007 Posts: 18 Location: East Coast
|
Posted: Sun Dec 30, 2007 4:55 pm Post subject: Start / Finish Time. Calulate How Long a Script Running. |
|
|
What I need to do is get the time when a script begins and when it finishes so that I can calculate how long that time period was. I'm fairly new to AHK, but not to coding in general. The stuff in the help file really only talks about formatting, I'm unsure of how to actually get the time value. I have no idea how to perform the calculations either once I have the value.
I was also wondering if there was a way to display the current time in a GUI. Is it possible to embed the windows time display / clock in a GUI?
Any help would be appreciated. Thanks. |
|
engunneer
Joined: 30 Aug 2005 Posts: 6847 Location: Pacific Northwest, US
|
Posted: Sun Dec 30, 2007 4:57 pm Post subject: |
|
|
start with A_TickCount. there are other ways to measure time (Like the performance counter), but A_TickCount is usually good enough. just save it to a variable at the start, check it again at the end, and do the math to display it.
if you make your own gui, guicontrol will let you update the time in the window (try using settimer)
to read out real time, see formattime
to do math on time, see envadd or envsub. _________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM |
|