Sign in to follow this  
Followers 0
Gus

FileGetVersion of self

8 posts in this topic

#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_Res_Fileversion=0.5.0.3
#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=p
Local $ver = FileGetVersion(@ScriptFullPath)
MsgBox(0, "version " & $ver, "Ver# in title")
 
 
This is based off the example in the help, but I'm always getting ver 0.0.0.0 returned..
 
using ScIte Version 3.3.0 & Autoit 3.3.8.1 / 3.3.9.11
 
I'm simply wanting to put the version of my compiled script (which is prompted for Autoincrement at compile time) into the titlebar..  What am I missing on such a basic thing?

Share this post


Link to post
Share on other sites



Gus,

That snippet works fine for me in both 3.3.8.1 and 3.3.9.15 - the version number is shown in the MsgBox title bar and it increases on each compile. :)

What do you get in the SciTE console when you compile? I get this:

>"M:\Program\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /beta /in "M:\Program\Au3 Scripts\fred4.au3"
+>18:31:07 Starting AutoIt3Wrapper v.2.1.2.24 SciTE v.3.3.2.0 ;  Keyboard:00000809  OS:WIN_VISTA/Service Pack 2  CPU:X64 OS:X86    Environment(Language:0409  Keyboard:00000809  OS:WIN_VISTA/Service Pack 2  CPU:X64 OS:X86)
>Running AU3Check (3.3.9.15)  from:M:\Program\AutoIt3\Beta
+>18:31:08 AU3Check ended.rc:0
>Running:(3.3.9.15):M:\Program\AutoIt3\Beta\aut2exe\aut2exe.exe  /in "M:\Program\Au3 Scripts\fred4.au3" /out "C:\Users\stevegunner\~AU3lvmtwbg.exe" /nopack /comp 2
+>18:31:10 Aut2exe.exe ended.M:\Program\Au3 Scripts\C:\Users\stevegunner\~AU3lvmtwbg.exe. rc:0
>18:31:10 Performing the Program Resource Update steps:
...>Updating Program Version information.
>18:31:12 Program Resource updating finished successfully.
+>18:31:12 Created program:M:\Program\Au3 Scripts\fred4.exe
>Updated the Source Version to:0.5.0.5...
>Exit code: 0    Time: 7.493
Do you get the "Updating Program Version information" line? :huh:

 

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

Gus,

You do have the enhanced version of SciTE4Autoit3 I presume? :huh:

Otherwise the Wrapper directives do not work. ;)

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
 
>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /beta /ErrorStdOut /in "C:\Program Files (x86)\AutoIt3\Examples\Helpfile\FileGetVersion_self.au3" /UserParams    
+>12:17:34 Starting AutoIt3Wrapper v.2.1.2.9    Environment(Language:0409  Keyboard:00000409  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64)
-> Skipping AU3check: Current version doesn't support the AutoIt3 v 3.3.9.5+ syntax.
>Running:(3.3.9.15):C:\Program Files (x86)\AutoIt3\Beta\autoit3.exe "C:\Program Files (x86)\AutoIt3\Examples\Helpfile\FileGetVersion_self.au3"    
--> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop
+>12:17:36 AutoIt3.exe ended.rc:0
>Exit code: 0    Time: 1.794
 

both release and beta version asks to increment but still no change showing in the msgbox.

This was a fresh install of auto-it, auto-it beta, and scite a few weeks ago. Just updated to beta.15 via overwrite method.

AutoIt3 Syntax Checker v1.54.22  & AutoIt3 Syntax Checker v3.3.9.15

Tools> Beta Compile, then Tools.Beta Run fielded the above console. Manually running syntaxcheck beta reports no errors but strangely it's like it doesn't get called properly from the compile.

Share this post


Link to post
Share on other sites

If you run the script out of SciTE you will get all zeroes.  The approach I took was to make a wrapper function that called FileGetVersion if the script was compiled.  Otherwise it just reads the .au3 file and pulls the version number making assumptions that the directives are at the very beginning of the file etc..  Just a raw approach.

I have to log off, but it may be in this previous post

'?do=embed' frameborder='0' data-embedContent>>

Share this post


Link to post
Share on other sites

Gus,

As MileAhead has pointed out - you need to compile, not run, to ge the AutoIt3Wrapper directives to function. You are just running the script from within SciTE, so the version number never gets set, nor incremented. ;)

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

Yeah, that was it.. running straight from Scite. Thank you!

Share this post


Link to post
Share on other sites

Gus,

Glad we got it sorted! :)

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

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