Código: Seleccionar todo
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 200, 101, 192, 124)
$Button1 = GUICtrlCreateButton("Contar", 16, 64, 75, 25, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Parar", 112, 64, 75, 25, $WS_GROUP)
$Label1 = GUICtrlCreateLabel("0", 96, 8, 20, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$contador = 0
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
contadorN()
EndSwitch
WEnd
Func contadorN()
While 1
Sleep(100)
$contador = $contador + 1
GUICtrlSetData($Label1, $contador)
If $contador = 100 Then
$contador = 0
EndIf
WEnd
EndFunc