Luigi Posted September 23, 2014 Share Posted September 23, 2014 (edited) Hi forum! When I compile a file as a3x format, it not show a file version... I supose this field is only to executables, this is case... write? Is possible put a new field in a3x file, with a file version? If is possible, how get the value of this field? But, get this value in linux! I can't get a exe's file version in linux... I use a php's function to do this: function file_get_version($sFilePath){ // http://bytes.com/topic/php/answers/169755-get-files-version-php $hFileOpen = fopen($sFilePath, "rb"); $hFile = fread($hFileOpen, filesize($sFilePath)); fclose($hFileOpen); $sTabBefore = 'F\0i\0l\0e\0V\0e\0r\0s\0i\0o\0n\0\0\0\0\0'; $sTabAfter = '\0\0'; if(preg_match("/$sTabBefore(.*?)$sTabAfter/", $hFile, $aMatch)){ if(is_array($aMatch) && (sizeof($aMatch) > 1)){ return $aMatch[1]; }else{ return "@error.1"; } }else{ return "@error.2"; } } Is possible apply the same concept to get a a3x's version? Best regards, Detefon Edited September 23, 2014 by Detefon Visit my repository Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 23, 2014 Moderators Share Posted September 23, 2014 Detefon,An a3x file is merely a tokenised and compressed script - exactly the same data is inserted into the AutoIt interpreter stub to create an exe file. So as there is no resource table within an a3x there is nowhere for the version information to be stored. 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...
Luigi Posted September 23, 2014 Author Share Posted September 23, 2014 ohhhhhh, then left me to appeal to the good old md5... Thank you Melba! Visit my repository Link to comment Share on other sites More sharing options...
JohnOne Posted September 23, 2014 Share Posted September 23, 2014 I'd put file version in file name. 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...
Mobius Posted September 23, 2014 Share Posted September 23, 2014 Detefon, This probably isn't what you want or like but you could write the version of your script or alternatively the AutoIt version used to build the a3x into a region of the a3x header. Dodgy example of writing and reading back: WVH_Example.7z Or a much safer alternative would be to write this information to the tail of the a3x, don't think you need an example for this Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now