#include-once


#Region Includes - Test-Region
#include "AVIConstants.au3"
#include "Memory.au3"
#include "SendMessage.au3"
#include "UDFGlobalID.au3"
#include "WinAPIConv.au3"
#include "WinAPIInternals.au3"
#include "WinAPISysInternals.au3"
#include <FileConstants.au3>
#include <MsgBoxConstants.au3>
#include <WinAPIFiles.au3>
#EndRegion - Test-Region Ende

; #Region Test-Region in Kommentar.
; #EndRegion

Global $g_sRS = "#Region"
Global $g_sRE = "#EndRegion"


; #GLOBAL VARIABLES# =================================================================================================
Global $__g_aSB_WindowInfo[1][10] = [[0, 0, 0, 0, -1]]
; [0][0] = Count of initiated GUIs  [n][0] = Handle to window
; [0][1] = Resizing horz position   [n][1] = Not used
; [0][2] = Resizing vert position   [n][2] = Average horizontal pixels per char
; [0][3] = Resizing GUI handle      [n][3] = Vertical pixels per char
; [0][4] = Resizing GUI index       [n][4] = Client area width
; [0][5] = Width of VScrollbar      [n][5] = Client area height
; [0][6] = Height of HScrollbar     [n][6] = Horizontal max setting
;                                   [n][7] = Vertical max setting
;                                   [n][8] = Vertical scrollbar position for minimize/restore
;                                   [n][9] = Horizontal scrollbar position for minimize/restore
$__g_aSB_WindowInfo[0][5] = _WinAPI_GetSystemMetrics(2) ; Width of VScrollbar:  SM_CXVSCROLL
$__g_aSB_WindowInfo[0][6] = _WinAPI_GetSystemMetrics(3) ; Height of HScrollbar: SM_CYHSCROLL

#cs

  #cs
    verschachtelter Blockkommentar 1.
  #ce
  #cs
    verschachtelter Blockkommentar 2.

    #comments-start
      verschachtelter Blockkommentar 3.
    #comments-end

    ; Zeilen-Kommentar in Block-Kommentar.

    Blockkommentare kann man mit #cs einleiten,
    und mit #ce beenden. <= Das hier hat KEINEN Einfluss auf die OUDF-Erkennung! 2020-06-29.

    Func TestFunctionInACommentBlock_1()
      MsgBox(0, "", "Hello")
    EndFunc
  #ce

	Wichtig! Diese Test-Datei hat Whitespace hinter manchen Funktions-Köpfen.
	-------- Deshalb nur mit einem Editor bearbeiten, der die Whitespace drin lässt!

Func TestFunctionInACommentBlock_1a()
  MsgBox(0, "", "Hello")
EndFunc

#ce

#comments-start

  Func TestFunctionInACommentBlock_2()
    MsgBox(0, "", "Hello")
  EndFunc

#comments-end ----------------------------------------------------------------

#cs

  Func TestFunctionInACommentBlock_3()
    MsgBox(0, "", "Hello")
  EndFunc

#ce Func TestFunctionAfterCe()
;   MsgBox(0, "", "Hello")
; EndFunc


; #cs beginnt einen Block-Kommentar,
; #ce beendet einen Block-Kommentar.

; Func TestFunctionInASingleComment()
;   MsgBox(0, "", "Hello")
; EndFunc


Example1()


  ; Test-Funktion, zum Testen absichtlich vom linken Rand eingerückt, 2020-06-23.
  func Bla1(byref $a, const  $x ,Const $Myconst,byreF _
$g,    Byref $MyVarbyref,$_epsi="=(;constance bYreF ", _ ;;;;;;;; " (
    $c = 0,$Dori = '==',$delta='$",$!?=(', _ ; <= ToDo: "=" im Literal wird mit Space umgeben.
    $b='()', $i= 1, $j =2, $_sMyDelim_1= '"'  ,$_sMy_Delim_2 ="'=''") ; blubb) a
    ; ... Func Dummy(weitere Anweisungen)
  endfunc

Func Lol123($b1 = "abc" or "xyz", $b2 ="String1"=="==", $b3 ="String1">"String2", $b4 ="abc"<"xyz", $b5 ="abc" <>"xyz", $b6 ="abc"+"xyz")
  ; Leere Test-Funktion Lol123.
EndFunc

Func Lol234($b1 = "abc" or "xyz", $b2 ="String1" aNd "==", $b3 ="String1" ==not "String2", $b4 ="abc" and noT "xyz", $b5 ="abc" AND "xyz", $b6 ="abc" OR nOt "xyz")
  ; Leere Test-Funktion Lol234.
EndFunc

; Bla2(

; In diesem FuncHead sind echte Tab-Zeichen.
	Func	Bla2(const $sExample = "const")	; Test-Kommentar.
  MsgBox(0, "", "Hello")
endfunc

Func Bla3($sMsg1 = 'Zeile 1 ',$sMsg2 = 'Zeile 1 ' _
  & "Zeile 2")
  MsgBox(0, "", $sMsg)
EndFunc

Func Bla4($sMsg1 = "Zeile 1 ",$sMsg2 = "Zeile 1 " _
  & 'Zeile 2')
  MsgBox(0, "", $sMsg)
EndFunc

Global $_sTest1 = "; This is a test comment."

Func IchBinUnfertig_IAmUnfinished_7($sLCC = " _"
EndFunc

func IchBinUnfertig_IAmUnfinished_1

func IchBinUnfertig_IAmUnfinished_2(

Func UnbalancedQuotes(''')

Func Test4($iVar_1,$iVar_2,$iVar_3,$iVar_4)
EndFunc

func IchBinUnfertig_IAmUnfinished_3

func IchBinUnfertig_IAmUnfinished_4("Hinweis: Sollte NICHT angezeigt werden. Wird aber angezeigt," _
  & " weil EndFunc hinter nächster unfertiger Func steht!")

IchBinUngueltig_IAmInvalid_1("test")
Func IchBinUngueltig_IAmInvalid_1($_sVar_1, $_sVar_2 = ""))
  MsgBox(0, $_sVar_1, $_sVar_2)
EndFunc

Func IchBinUngueltig_IAmInvalid_1a($_sVar_1, $_sVar_2 = "", $_iVar_1 = (8 + 4) * 2))
  MsgBox(0, $_sVar_1, $_sVar_2)
EndFunc

func IchBinUnfertig_IAmUnfinished_2()

func IchBinUnfertig_IAmUnfinished_6_UndSollteNichtErfasstWerden()  -   unzulaessiger Text

EndFunc

func IchBinUngueltig_IAmInvalid_2 ($s =  ')

EndFunc

func IchBinUngueltig_IAmInvalid_3 ( $s = """)

EndFunc


; #INDEX# =======================================================================================================================
; Title .........: Animation
; AutoIt Version : 3.3.14.5
; Language ......: English
; Description ...: Functions that assist with AVI control management.
;                  An animation control is a window that displays an Audio-Video Interleaved (AVI) clip.  An AVI clip is a series
;                  of bitmap frames like a movie. Animation controls can only display AVI clips that do not  contain  audio.  One
;                  common use for an animation control is to indicate  system  activity  during  a  lengthy  operation.  This  is
;                  possible because the operation thread continues executing while the AVI clip is displayed.  For  example,  the
;                  Find dialog box of Microsoft Windows Explorer displays a moving magnifying glass as the system searches for  a
;                  file.
;
;                  If you are using comctl32.dll version 6 the thread is not supported, therefore make sure that your application
;                  does not block the UI or the animation  will  not  occur.  An  animation  control  can  display  an  AVI  clip
;                  originating from either an uncompressed AVI file or from an AVI file that  was  compressed  using  run  length
;                  (BI_RLE8) encoding. You can add the AVI clip to your application as an AVI resource, or the clip can accompany
;                  your application as a separate AVI file.
;
;                  The AVI file, or resource, must not have a sound channel.  The capabilities of the animation control are  very
;                  limited and are subject to change.  If you need  a  control  to  provide  multimedia  playback  and  recording
;                  capabilities for your application, you can use the MCIWnd control.
; Author(s) .....: Paul Campbell (PaulIA)
; Dll(s .........: user32.dll
; ===============================================================================================================================

; #VARIABLES# ===================================================================================================================

Global $__g_hAVLastWnd
; ===============================================================================================================================

; #CONSTANTS# ===================================================================================================================
Global Const $__AVICONSTANT_ClassName = "SysAnimate32"
; ===============================================================================================================================

; #CURRENT# =====================================================================================================================
; _GUICtrlAVI_Close
; _GUICtrlAVI_Create
; _GUICtrlAVI_Destroy
; _GUICtrlAVI_IsPlaying
; _GUICtrlAVI_Open
; _GUICtrlAVI_OpenEx
; _GUICtrlAVI_Play
; _GUICtrlAVI_Seek
; _GUICtrlAVI_Show
; _GUICtrlAVI_Stop
; ===============================================================================================================================

Func Test123(''')
EndFunc

; #FUNCTION# ====================================================================================================================
; Author ........:
; Modified.......:
; ===============================================================================================================================
Func Example1()
    ; Create a constant variable in Local scope of the filepath that will be read/written to.
    Local Const $sFilePath = _WinAPI_GetTempFileName(@TempDir)

    ; Create a temporary file to read data from.
    If Not FileWrite($sFilePath, "This is an example of using FileRead.") Then
        MsgBox($MB_SYSTEMMODAL, "", "An error occurred whilst writing the temporary file.")
        Return False
    EndIf

    ; Open the file for reading and store the handle to a variable.
    Local $hFileOpen = FileOpen($sFilePath, $FO_READ)
    If $hFileOpen = -1 Then
        MsgBox($MB_SYSTEMMODAL, "", "An error occurred when reading the file.")
        Return False
    EndIf

    ; Read the contents of the file using the handle returned by FileOpen.
    Local $sFileRead = FileRead($hFileOpen)

    ; Close the handle returned by FileOpen.
    FileClose($hFileOpen)

    ; Display the contents of the file.
    MsgBox($MB_SYSTEMMODAL, "", "Contents of the file:" & @CRLF & $sFileRead)

    ; Delete the temporary file.
    FileDelete($sFilePath)
EndFunc   ;==>Example1


#cs

  Func TestFunctionInACommentBlock_4()
    MsgBox(0, "", "Hello")
  EndFunc

#ce


; #FUNCTION# ====================================================================================================================
; Author ........:
; Modified.......:
; ===============================================================================================================================
Func Example2(const byref $sVar_1 ='const')
    ; Create a constant variable in Local scope of the filepath that will be read/written to.
    Local Const $sFilePath = _WinAPI_GetTempFileName(@TempDir)

    ; Create a temporary file to read data from.
    If Not FileWrite($sFilePath, "This is an example of using FileOpen.") Then
        MsgBox($MB_SYSTEMMODAL, "", "An error occurred whilst writing the temporary file.")
        Return False
    EndIf

    ; Open the file for reading and store the handle to a variable.
    Local $hFileOpen = FileOpen($sFilePath, $FO_READ)
    If $hFileOpen = -1 Then
        MsgBox($MB_SYSTEMMODAL, "", "An error occurred when reading the file.")
        Return False
    EndIf

    ; Read the contents of the file using the handle returned by FileOpen.
    Local $sFileRead = FileRead($hFileOpen)

    ; Close the handle returned by FileOpen.
    FileClose($hFileOpen)

    ; Display the contents of the file.
    MsgBox($MB_SYSTEMMODAL, "", "Contents of the file:" & @CRLF & $sFileRead)

    ; Delete the temporary file.
    FileDelete($sFilePath)
EndFunc   ;==>Example


#cs

  Func TestFunctionInACommentBlock_5()
    MsgBox(0, "", "Hello")
  EndFunc

#ce


; #FUNCTION# ====================================================================================================================
; Author ........:
; Modified.......:
; ===============================================================================================================================
Func Example3()
    ; Create a constant variable in Local scope of the filepath that will be read/written to.
    Local Const $sFilePath = _WinAPI_GetTempFileName(@TempDir)

    ; Open the file for read/write access.
    Local $hFileOpen = FileOpen($sFilePath, $FO_READ + $FO_OVERWRITE)
    If $hFileOpen = -1 Then
        MsgBox($MB_SYSTEMMODAL, "", "An error occurred when reading/writing the file.")
        Return False
    EndIf

    ; Write some data.
    FileWrite($hFileOpen, "This is some data to show that the handle was open with read/write access." & @CRLF)

    ; Retrieve the current position in the file.
    Local $iFilePos = FileGetPos($hFileOpen)

    ; Now, adjust the position to the beginning.
    FileSetPos($hFileOpen, 0, $FILE_BEGIN)

    ; Display the contents of the file.
    MsgBox($MB_SYSTEMMODAL, "", FileRead($hFileOpen))

    ; Now, adjust the position back to the previous position.
    FileSetPos($hFileOpen, 0, $iFilePos)

    ; Write some addition data.
    FileWrite($hFileOpen, "This is some additional data.")

    ; Adjust the position back to the previous position.
    FileSetPos($hFileOpen, 0, $FILE_BEGIN)

    ; Display the contents of the file.
    MsgBox($MB_SYSTEMMODAL, "", FileRead($hFileOpen))

    ; Close the handle returned by FileOpen.
    FileClose($hFileOpen)

    ; Delete the temporary file.
    FileDelete($sFilePath)

    Return True
EndFunc   ;==>Example3


Func Bla10()

