Masz tu nawet z gui:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 190, 139, 192, 124)
$Button1 = GUICtrlCreateButton("Start", 0, 80, 89, 57, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Exit", 112, 80, 73, 57, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
start()
Case $Button2
stop()
EndSwitch
WEnd
Func stop()
Exit
EndFunc
Func start()
While 1
Send("{F3}")
Sleep(30000)
WEnd
EndFunc