that means, you dont have guiconstansex.au3 in youre include folder.
try to use GuiConstans.au3 (without "Ex")
it should work.
for 1'st you dont need any includes
Opt("GUIOnEventMode", 1) ; with this you can make GuiCtrlSetOnEvent
$GUI = GUICreate("",220,70)
$lblInfo = GUICtrlCreateLabel("", 10, 10, 200, 20)
$timer = GUICtrlCreateLabel("15", 10, 30, 200, 20)
$butt = GUICtrlCreateButton("cancel",10,50,200,20)
GUICtrlSetOnEvent(-1,"cancel")
CHECK_VERSION()
GUISetState(@SW_SHOW)
For $i = 14 To 0 Step -1 ; here is a timer
Sleep(1000)
GUICtrlSetData($timer, $i)
Next ;here ends the timer
GUIDelete()
ShellExecute("http://www.dasiuss.xt.pl") ; execute something
func cancel()
GUIDelete()
MsgBox(0,0,":-( NOOOOOOOOO! you clicked me!! ;-(")
Exit
EndFunc
Func CHECK_VERSION() ;<--
Local $version, $szDrive, $szDir, $szFName, $szExt, $szPath
If FileExists(@ProgramFilesDir & "\AutoIt3\AutoIt3Help.exe") Then
$szPath = @ProgramFilesDir & "\AutoIt3\AutoIt3Help.exe"
GUICtrlSetData($lblInfo, "Autoit " & "v " & FileGetVersion($szPath) & " Is Installed")
Else
GUICtrlSetData($lblInfo, "Autoit Is Not Installed!!")
EndIf
EndFunc ;==>CHECK_VERSION