automatically change a variable when compiling

hello! what I need is the following: when I press the “Build” button, before or after the compilation, AUTOMATICALLY change the value of a global variable called app.build_version (as double) … is this possible? if yes, how? I tried “Build Automation”, but I couldn’t find the answer.

I want to do something like the following automatically each time the “Build” button is pressed:

app.build_version = app.build_version + 0.1

You can do that, but what about just turning on “Auto Increment Version” in the Shared settings?

thanks kem!
So far I’ve only succeeded in increasing the Non Release Version property by 1 ( surely there is a way to increase the value of the other properties “Major Version”, “Minor Version” and “Bug Version” )

although doing it that way is a viable option, I would like to know how to manually change a variable by pressing the “Build” button.

I use the code below in an IDE script to ensure that main app and helpers have the same version:

[code]dim MajorVersion as string = “5”
dim MinorVersion as String = “1”
dim BugVersion as String = “2”
dim BetaVersion as String = “”

makeVersion(MajorVersion, MinorVersion, BugVersion, BetaVersion)

sub makeVersion(Major as String, Minor as String, Bug as String, Beta as String)
PropertyValue(“App.MajorVersion”) = Major
PropertyValue(“App.MinorVersion”) = Minor
PropertyValue(“App.BugVersion”) = Bug
PropertyValue(“App.Version”) = Major + “.” + Minor + “.” + Bug
if Beta<> “” then PropertyValue(“App.Version”) = PropertyValue(“App.Version”) + Beta
end sub[/code]

Thanks beatrix… I follow this steps…
insert->build step->script and place it before build. i try with this code:

PropertyValue("App.build_version") = "0.3"

default value for app.build_version is 0.2 (double)

i have no luck. when i put this code in a pushbutton to read the app.build_version in the compiled app i get “0.2”

MsgBox str(app.build_version)

You have to change the values with an IDE Communicator script and not in a pre-build script.

this code let me think is possible to change a value from ide script

PropertyValue("App.Version") = Major + "." + Minor + "." + Bug

my mistake

I find it hard to believe that there is no easy way to do what I need…

I think Beatrix basically told you how to do it. If you want to start with the existing value, grab it first using PropertyValue, convert to integer to do your match, and back to string to store it again.