Opt("GUIOnEventMode", 1)
Global $RunState = False
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 231, 67, 1144, 503)
$Start = GUICtrlCreateButton("Start", 16, 16, 91, 25)
GUICtrlSetOnEvent(-1, "Start")
$Stop = GUICtrlCreateButton("Stop", 112, 16, 99, 25)
GUICtrlSetOnEvent(-1, "Stop")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
Sleep (1000)
WEnd
Func Start ()
$RunState = True
If $RunState then
while 1
ToolTip('working',0,0)
Sleep (1000)
WEnd
EndIf
EndFunc
Func Stop ()
$RunState = False
ToolTip('stop',0,0)
EndFunc
Global $RunState = False
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 231, 67, 1144, 503)
$Start = GUICtrlCreateButton("Start", 16, 16, 91, 25)
GUICtrlSetOnEvent(-1, "Start")
$Stop = GUICtrlCreateButton("Stop", 112, 16, 99, 25)
GUICtrlSetOnEvent(-1, "Stop")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
Sleep (1000)
WEnd
Func Start ()
$RunState = True
If $RunState then
while 1
ToolTip('working',0,0)
Sleep (1000)
WEnd
EndIf
EndFunc
Func Stop ()
$RunState = False
ToolTip('stop',0,0)
EndFunc