Exit Posted July 25, 2013 Share Posted July 25, 2013 (edited) FileGetVersion() shows 0.0.0.0 instead of 3.3.9.12 If Not @Compiled Then Exit MsgBox(Default, " ", "Please compile before testing.") MsgBox(Default, " ", @AutoItVersion & @LF & FileGetVersion(@ScriptFullPath)) Edited July 25, 2013 by Exit App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
guinness Posted July 25, 2013 Share Posted July 25, 2013 Seems FILEVERSION is by default 0.0.0.0 if no pragma directive is used. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 25, 2013 Moderators Share Posted July 25, 2013 Exit, That is because the FileVersion data in the resources is set by #pragma directives and no longer reflects the AutoIt version used to compile: #pragma compile(FileVersion, 1.2.3.4) If Not @Compiled Then Exit MsgBox(Default, " ", "Please compile before testing.") MsgBox(Default, " ", @AutoItVersion & @LF & FileGetVersion(@ScriptFullPath)) All clear? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Administrators Jon Posted July 25, 2013 Author Administrators Share Posted July 25, 2013 But aren't UDF's great examples of tests? In some ways yes, but you end up getting an erroneous bug report on the UDF rather than the feature so you have two levels of troubleshooting to do. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
jpm Posted July 25, 2013 Share Posted July 25, 2013 Do not use in-progress beta functions in the beta UDFs. A lot of time it is OK with the previous beta implementation. Some regression can occur but next beta can correct it. anyway I understand that using stable functionality is better Thanks for the warning JP Link to comment Share on other sites More sharing options...
guinness Posted July 25, 2013 Share Posted July 25, 2013 In the SciTe folder there appears to be "leftovers" which jpm and myself can't seem to replicate when re-building the help file from svn. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Exit Posted July 25, 2013 Share Posted July 25, 2013 (edited) The beta helpfile claims for FileGetVersion(): Or a special one "CompiledScript" which is set for a compiled script. FileGetVersion(@AutoItExe, "CompiledScript") will return "AutoIt v3 Script : 3, 2, 1, 2".Unfortunately, @error = 1 is raised and no Information about the Autoit Version used.How can we determine the autoit version used to build a *.EXE file ?There should be some meaningful defaults if no #Pragma is used.Here a script to show all variations.If Not @Compiled Then Exit MsgBox(Default, " ", "Please compile before testing.") Global $t = @LF _t("Comments") _t("FileVersion") _t("InternalName") _t("ProductName") _t("CompanyName") _t("LegalCopyright") _t("ProductVersion") _t("FileDescription") _t("LegalTrademarks") _t("PrivateBuild") _t("OriginalFilename") _t("SpecialBuild") _t("CompiledScript") _t("DefaultLangCodepage") MsgBox(Default, " ", @AutoItVersion & @LF & $t) Func _t($s) $s1= FileGetVersion(@ScriptFullPath, $s) $t &= @error& ">"&$s&"<" & ">" & $s1 & "<" & @LF EndFuncTry it in 3.3.8.1 and 3.3.9.12 Edited July 25, 2013 by Exit App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 25, 2013 Moderators Share Posted July 25, 2013 Exit, How can we determine the autoit version used to build a *.EXE file ?Just use the @AutoItVersion macro: MsgBox(0, "AutoIt Version", @AutoItVersion)Compile that and see what you get with the different versions. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Exit Posted July 25, 2013 Share Posted July 25, 2013 Exit, Just use the @AutoItVersion macro: MsgBox(0, "AutoIt Version", @AutoItVersion)Compile that and see what you get with the different versions. M23Thanks Melba, you see, I've used @autoitversion in the messagebox of my script above.I want to determine what Versions are used for every single EXE on my PC.The reason is to rework backlevel scripts.Till now, it was easy due to the Fileversion Information. If you hover over an EXE, the Version was shown (at least till 3.3.8.1)Now, there is only displayed 0.0.0.0So, i have to guess, what Version was used for building this EXE.At least, "CompiledScript" should be set if no #pragma is specified. App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
Developers Jos Posted July 25, 2013 Developers Share Posted July 25, 2013 Hello, I noticed that Aut2Exe "fails" when compiling from ScITE with the #pragma out directive. Tried using the latest Beta version of Autoit3Wrapper? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
jpm Posted July 25, 2013 Share Posted July 25, 2013 Thanks Melba, you see, I've used @autoitversion in the messagebox of my script above. I want to determine what Versions are used for every single EXE on my PC. The reason is to rework backlevel scripts. Till now, it was easy due to the Fileversion Information. If you hover over an EXE, the Version was shown (at least till 3.3.8.1) Now, there is only displayed 0.0.0.0 So, i have to guess, what Version was used for building this EXE. At least, "CompiledScript" should be set if no #pragma is specified. Jon, I really sustain the fact that "CompilesScipt" should be back JP Link to comment Share on other sites More sharing options...
JohnOne Posted July 26, 2013 Share Posted July 26, 2013 Is it normal for beta to overtake context menu? When I secondary click on a script, all options regarding AutoIt and scite (edit, run, compile) refer to beta, release is not available. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
saudumm Posted July 26, 2013 Share Posted July 26, 2013 Tried using the latest Beta version of Autoit3Wrapper? Jos The latest Beta of Autoit3Wrapper is working fine. I don't know why Aut2Exe fails then compiling with the out-directive, because despite the error "Aut2exe.exe ended errors because the target exe wasn't created, abandon build.rc:9999" the target exe is created successfully and it is working as expected. Link to comment Share on other sites More sharing options...
guinness Posted July 26, 2013 Share Posted July 26, 2013 Try without AutoIt3Wrapper please. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
AZJIO Posted July 26, 2013 Share Posted July 26, 2013 (edited) @Exit If $CmdLine[0] Then Switch $CmdLine[1] Case '/v' MsgBox(0, 'Version', @AutoItVersion) EndSwitch EndIf I do not want to in the properties file has information about the programming language #AutoIt3Wrapper_Res_Field=Version|%AutoItVer% Edited July 26, 2013 by AZJIO My other projects or all Link to comment Share on other sites More sharing options...
saudumm Posted July 26, 2013 Share Posted July 26, 2013 (edited) Try without AutoIt3Wrapper please. Here are my results when compiling without AutoIt3Wrapper: Edit: AutoIt3Wrapper Beta solved all problems. It's now working as expected. Edited July 26, 2013 by saudumm Link to comment Share on other sites More sharing options...
jpm Posted July 26, 2013 Share Posted July 26, 2013 Jon, error is not detected with the following script #AutoIt3Wrapper_Run_AU3Check=n Local $a = 1 Local $b = 2 $a > $b Link to comment Share on other sites More sharing options...
Administrators Jon Posted July 26, 2013 Author Administrators Share Posted July 26, 2013 Yeah, it's not an error anymore. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Richard Robertson Posted July 26, 2013 Share Posted July 26, 2013 So expressions are now valid statements? Not sure if useful. Link to comment Share on other sites More sharing options...
Administrators Jon Posted July 26, 2013 Author Administrators Share Posted July 26, 2013 So expressions are now valid statements? Not sure if useful. It's a side effect of getting tenary to work at the start of a line. I could block it but it's allowed in most other languages so seems like it's OK. It's a case of having to write extra code to block it as opposed to adding code for a useless feature. trancexx 1 Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Recommended Posts