i tried to make a gui counter with one button start/pause,
but when it starts, it looks refresh quickly, and cpu usage is not low,
how can i make it better ? thanks!
#include <GUIConstantsEx.au3>
$gui = GUICreate("Test", 333, 333)
$btn01=GUICtrlCreateButton("START",15,15)
GUISetFont(222 )
$lbl01 = GUICtrlCreateLabel("", 45, 53, 300, 300)
GUISetState()
Global $cnt=0, $swh=0
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
Case $btn01
$cnt +=1
$swh
Here 2 simple countdowns which can be modified for your needs easily.
;coded by UEZ 2011
#include <GUIConstantsEx.au3>
Opt('MustDeclareVars', 1)
Global $msg
Global $hGUI = GUICreate("Simple Countdown by UEZ 2011", 350, 150)
Global $label = GUICtrlCreateLabel("", 40, 30, 260, 80)
;~ GUICtrlSetBkColor(-1, 0x808080)
GUICtrlSetFont(-1, 50, 400, 0, "Arial", 4)
Global $button = GUICtrlCreateButton("Add 60 sec", 275, 120, 70)
GUISetState()
Global $countdown = 1.2 ;minutes for countdown
Glob