ds10025 Posted February 1, 2007 Posted February 1, 2007 I'm writing my first script. This script is on going. How can I automate the process to display the version number of the script?
Shevilie Posted February 1, 2007 Posted February 1, 2007 Ehm where do you wanna display the versionnumber ??? And is it the autoit version number it has been compiled with or you own version number of the program ?? Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit
sandyd Posted February 1, 2007 Posted February 1, 2007 Create a CONST variable called $VERSION and give it value. Increment that value every time you make a change to the script. When you need to display the version, just use the variable. ----[ SandyD ]---
JerryD Posted February 1, 2007 Posted February 1, 2007 I'm writing my first script. This script is on going. How can I automate the process to display the version number of the script?OK, this may be a bit long winded, but it's worth it. Use SciTE for AutoIt as your editor. If you do this, you'll be able to add compiler directives that will not only embed the version number in the final EXE (instead of the AutoIt version number), but can also automatically increment the number after each compilation. You will also need to download ResHacker.zip and extract it to the SciTe\AutoIt3Wrapper directory. In the beginning of your script, put the following compiler directives: #compiler_res_fileversion=1.0.0.0 Now when you compile, the EXE version will be 1.0.0.0, and the code in the script will increment up to 1.0.0.1. I always have the following lines after that so I can get or display the program's version number easily: Global $Rev If @Compiled Then $Rev = FileGetVersion ( @ScriptFullPath ) Else $Rev = '1.0.0' EndIfI put the $Rev = '1.0.0' in for when I run without compiling during testing. Check out all the compiler directives and variables. One other compiler directive I use that's really handy is #compiler_res_field=Build Date|%longdate% %time% #compiler_res_field=AutoItVersion|%AutoItVer% This embeds the date and time I compiled the script, and what version compiler I used into the final EXE. Unfortunately the info doesn't display in Vista any more! Sometimes Microsoft is SOOO DUMB!!! Theres a lot of other directives. When SciTE is open, select Help --> SciTE Help for info.
Bert Posted February 1, 2007 Posted February 1, 2007 when you are compiling your script, you can use ResourceHack to set the version. The Vollatran project My blog: http://www.vollysinterestingshit.com/
ds10025 Posted February 2, 2007 Author Posted February 2, 2007 This is great! I will try it. I am also using CVS which also use it own version number. Will it be possible to have one version number that covers everything? When the script is run I want to display the version number, maybe as label is this possible by using label $version? OK, this may be a bit long winded, but it's worth it. Use SciTE for AutoIt as your editor. If you do this, you'll be able to add compiler directives that will not only embed the version number in the final EXE (instead of the AutoIt version number), but can also automatically increment the number after each compilation. You will also need to download ResHacker.zip and extract it to the SciTe\AutoIt3Wrapper directory. In the beginning of your script, put the following compiler directives: #compiler_res_fileversion=1.0.0.0 Now when you compile, the EXE version will be 1.0.0.0, and the code in the script will increment up to 1.0.0.1. I always have the following lines after that so I can get or display the program's version number easily: Global $Rev If @Compiled Then $Rev = FileGetVersion ( @ScriptFullPath ) Else $Rev = '1.0.0' EndIfI put the $Rev = '1.0.0' in for when I run without compiling during testing. Check out all the compiler directives and variables. One other compiler directive I use that's really handy is #compiler_res_field=Build Date|%longdate% %time% #compiler_res_field=AutoItVersion|%AutoItVer% This embeds the date and time I compiled the script, and what version compiler I used into the final EXE. Unfortunately the info doesn't display in Vista any more! Sometimes Microsoft is SOOO DUMB!!! Theres a lot of other directives. When SciTE is open, select Help --> SciTE Help for info.
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