﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
3034	_Timer_SetTimer() doc example	c.haslam	Jpm	"A simple example for newbies might be helpful:
{{{
#include <timers.au3>
Global $giMsecs = 0, $gsResult = ''

_Example_TimeOut()

Func _Example_TimeOut()
	Local $hGUI = GUICreate("""", 140, 64, -1, -1, 0)
	GUICtrlCreateLabel(""Insert a CD into the tray"", 8, 8, 115, 17)
	GUISetState(@SW_SHOW)
	Local $iIDtimer = _Timer_SetTimer($hGUI, 1000, ""Check_mounted"") ; create timer
	While $gsResult=''
		sleep(200)
	WEnd
	MsgBox(0,'',$gsResult)
	_Timer_KillTimer($hGUI,$iIDtimer)
	GUIDelete($hGUI)
EndFunc

Func Check_mounted($hWnd, $iMsg, $iIDTimer,$iTime)
	$gsResult = ''
	If FileExists('E:\') Then	; CD drive letter
		$gsResult = 'inserted'
	Else
		$giMsecs += 1000
		If $giMsecs=10000 Then
			$gsResult = 'timed out'
		EndIf
	EndIf
EndFunc
}}}

This exmaple might also be included for _Timer_KillTimer."	Feature Request	closed	3.3.13.21	Documentation		None	Completed		
