Kinda messy....but just an idea.
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile=test.exe
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_Res_Comment=test
#AutoIt3Wrapper_Res_Fileversion=1.0.0.2
#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
If @Compiled = 1 Then
;filegetversion...
$ver = FileGetVersion(@ScriptFullPath)
MsgBox(0, "Version", "Version " & $ver)
Else
$file = FileOpen(@ScriptFullPath, 0)
If $file = -1 Then
MsgBox(0, "Error", "Unable to open file.")
Exit
EndIf
; Read in lines of text until the EOF is reached
While 1
Local $line = FileReadLine($file)
If @error = -1 Then ExitLoop
If StringInStr($line, "#AutoIt3Wrapper_Res_Fileversion=") Then
$ver = StringRight($line, 7)
MsgBox(0, "Version", "Version " & $ver)
ExitLoop
EndIf
;MsgBox(0, "Line read:", $line)
WEnd
FileClose($file)
EndIf