Sign in to follow this  
Followers 0
Luigi

doubts about a3x file

5 posts in this topic

#1 ·  Posted (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 by Detefon

m(o.O)m

Share this post


Link to post
Share on other sites



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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

ohhhhhh, then left me to appeal to the good old md5...

Thank you Melba!  :


m(o.O)m

Share this post


Link to post
Share on other sites

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 ;)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0