Adding to a variable.

Got a problem you cannot solve? Try here.
Post Reply
bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Adding to a variable.

Post by bokkie »

Almost to embarrassed to ask but...

I found some code used in updating progress bars and gauges. Following snippet:

PROGRESS = $PROGRESS$ + 1
PROGRESS1 = $PROGRESS$ * 10

Set Variable FRED to 3


How can I enter a statement like FRED = $FRED$ + 15? The PROGRESS and PROGRESS1 statements are valid but I can't work out how you actually enter those in the MSIcode window.

Any ideas appreciated.
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP
StyX
Posts: 51
Joined: Fri Apr 11, 2008 7:14 am
Location: Stavanger, Norway
Contact:

Post by StyX »

Mathemathics

*StyX- goes back to his seat, while watching for a light bulb to appare above bookie's head*
bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Post by bokkie »

StyX wrote:Mathemathics

*StyX- goes back to his seat, while watching for a light bulb to appare above bookie's head*
Doh! Mathematics? I was looking at it the other day but it never occurred to me to think of it as useful for adding two numbers together. Thanks for the light bulb Styx. Now, if I can only work out how to switch it on. Homer Simpson would be proud of me and welcome me as one of his own. Doh!

EDIT: I should have realised that by positioning on the statement and hitting the enter key would have displayed the Mathematics dialog.
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Also, to append/prepend a value to a variable, you can call Set Variable VAR to "prepend $VAR$ append" etc...
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Post Reply