Jump to content
Sign in to follow this  

Maximized Stopwatch

Recommended Posts


I'm trying to write a stopwatch program that meets the following:

- needs to be full screen

-3 counters

- Display at the top for the selected counter

- lapse timers for the other 2 timers when 1 is selected

I would like some suggestions as to how to make the counter display big (like using graphics since fonts won't be that large). The top of the screen should display the time in HH:MM:SS since the button was clicked. For example, if you start at 2:00 and click Setup, then wait for 1 hr 15 min and 2 sec then click Run you should see the top counter clear and begin showing Run time but there should be a smaller display for Setup showing 01:15:02.

I hope I explained that well enough.

The screen setup should look similar to the following (only maximized which I can't seen to get right):


; Job Timer


; This program is a stopwatch for three job functions = Setup, Run, and Down time.

; It will display one of the three times in a large window at the top of the screen with lapse times on the others below it.

; Times will be reset by clicking on the "Reset All" button at the bottom of the window.


; Revisions:



#include <GUIConstantsEx.au3>

#include <WindowsConstants.au3>

Opt('MustDeclareVars', 1)


Func Screen()

Local $msg

; ********** Screen Layout **********

GUICreate("Job Timer") ; will create a dialog box that when displayed is centered

GUISetState(@SW_SHOW) ; will display an empty dialog box

; ********** Elapsed Time Window ********** ;display the large time elapsed window here

; ********** Lapse Time Window ********** ;display the lapse times of the other 2 counters here

; ********** BUTTONS **********




GUICtrlCreateButton("RESET ALL",150,350,75) ;RESET ALL button at the bottom and will reset all of the counters

; Run the GUI until the dialog is closed

While 1

$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop




;--------------- END OF CODE ---------------

I'm running Windows 7 in case that matters but the PC that will be running this program will have XP Pro. Your suggestions are greatly appreciated!

Share this post

Link to post
Share on other sites

First, yes fonts will be that large, look at GUICtrlSetFont. Second, for the fullscreen gui look at @DesktopWidth and @DesktopHeight.

Edited by Hawkwing

The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.

Share this post

Link to post
Share on other sites

I tried running the script in the link you provided but it does not launch. Maybe Windows 7 issue, I don't know. But if you say the fonts will work then I will continue down that path. Thanks for the reply.

Edited by rwright142

Share this post

Link to post
Share on other sites

Here is an online version of that same link for GUICtrlSetFont()



Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver: - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post

Link to post
Share on other sites

Thanks, it looks like I will be able to just use fonts after all. That's a huge relief. Now I just need to find the best way to make the display window with the counter. I'll see if a timer function would work but if anyone has any suggestions or code samples feel free to suggest something. I'm going for something like this:


║ ║

║ HH:MM:SS ║

║ ║




NOTE: The box is not showing up right in the displayed version, but there should be a framed box around the time HH:MM:SS like in the attached graphic.


Edited by rwright142

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