﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
4066	OnAutoItStartRegister Example fails	donnyh13	Jpm	"The help file for '''OnAutoItStartRegister''' states:
 As the function runs before any of the main script code is executed, the function '''cannot''' reference any variables defined in an '''#include''' nor any variables defined as Global within the script. All variables within the function are treated as '''Local'''.
Yet the example for '''OnAutoItStartRegister''' does this very thing,

{{{
#!autoit
#include <MsgBoxConstants.au3>

; Register Example() and SomeFunc() to be called when AutoIt starts.

#OnAutoItStartRegister ""Example""
#OnAutoItStartRegister ""SomeFunc""

Sleep(1000)

Func Example()
	MsgBox($MB_SYSTEMMODAL, """", ""Function 'Example' is called first."")
EndFunc   ;==>Example

Func SomeFunc()
	MsgBox($MB_SYSTEMMODAL, """", ""Function 'SomeFunc' is called second."")
EndFunc   ;==>SomeFunc
}}}

 MsgBox('''$MB_SYSTEMMODAL''',

Of course the example fails with:
 ""C:\Program Files (x86)\AutoIt3\Examples\Helpfile\OnAutoItStartRegister.au3"" (11) : ==> '''Variable used without being declared'''.:
 MsgBox($MB_SYSTEMMODAL, """", ""Function 'Example' is called first."")
 MsgBox( ERROR
"	Bug	closed	3.3.19.0	AutoIt	3.3.18.0	None	Fixed		
