Page 1 of 1

How to display an Array - Help

Posted: Mon Feb 27, 2012 2:24 pm
by DanStutzman
I use InstallAware for all types of coding and in this instance I am building an Image Verification Utility that will be driven by a centrally managed INI/XML file (Haven't decided yet, INI's have always worked for me in the past with InstallShield).

What I need help with is I need to know how to display an array of applications to a common variable. With other tools I would use a Display Array command but in IA I haven't seen anything like this.

So this is my code example so far and I need to know how to display all 4 apps and not just the last.

Code: Select all

Set Variable A to 0
 
repeat
 B = $A$ + 1
 Set Variable COUNT to 4
 Set Variable NAME to APP
 Set Variable A to $B$
until Variable B Equals 4
Set Variable VAR to $NAME$$B$$NEWLINE$
Set Variable APPARRAY to $VAR$
 
Display Dialog: App Array Testing, wait for dialog to return (modal)
Basically all I want is a dialog that will look like this:

App1
App2
App3
App4


Any help will be greatly appreciated.

Re: How to display an Array - Help

Posted: Tue Feb 28, 2012 6:13 am
by FrancescoT
Dear User,

the following code lines could help you?

Set Variable MYVAR to App1$NEWLINE$App2$NEWLINE$App3
MessageBox: DEBUG, $MYVAR$

Regards

Re: How to display an Array - Help

Posted: Tue Feb 28, 2012 8:05 am
by DanStutzman
Simplicity at it's finest. While not quite as dynamic as I was seeking, your format is exactly what I'm looking for and I know how to create dynamic values based upon variable arrays (IA really needs an array function; hardcoding it is easy enough but it ends up being a major logic bomb for newbs).

Thank you & I will post my final code when I'm done.

Re: How to display an Array - Help

Posted: Tue Feb 28, 2012 8:59 am
by FrancescoT
:D