Set Variable to value of another variable

Got a problem you cannot solve? Try here.
JerzyK
Posts: 4
Joined: Thu Jul 29, 2021 5:20 am

Set Variable to value of another variable

Postby JerzyK » Fri Aug 13, 2021 4:56 am

Hi,

I would like to save a variable value in another variable.

What script I work on does:

Code: Select all

     Set Variable TMP to
     MyPlugin (get result into variable TMP) // TMP = 25 after that
     Set Variable INSTALLED_VERSION to $TMP$ // INSTALLED_VERSION = TM" instead 25


I know variable TMP is a horrible name, but this is what I got to work with, so bear with me :)
Either way I am confused if It is even possible to assign this way. Documentation doesn't say it would be illegal, but it is not working while compiling...

So can I achieve this somehow?

JerzyK
Posts: 4
Joined: Thu Jul 29, 2021 5:20 am

Re: Set Variable to value of another variable

Postby JerzyK » Fri Aug 13, 2021 6:56 am

To make it look weirder, when I do such assignement at the begging of the script it works just fine.

I even got this:

Code: Select all

     Set Variable TMP to TEST
     Set Variable ZAINSTALOWANA_WERSJA_FIREBIRD to
     Set Variable ZAINSTALOWANA_WERSJA_FIREBIRD to $TMP$ // ZAINSTALOWANA_WERSJA_FIREBIRD = TEST after this executes
     Set Variable TMP to
     Set Variable ZAINSTALOWANA_WERSJA_FIREBIRD to
     repeat
       Firebird wersja (get result into variable TMP) // TMP = 25 after this executes
       Set Variable ZAINSTALOWANA_WERSJA_FIREBIRD to $TMP$ // ZAINSTALOWANA_WERSJA_FIREBIRD = TMP after this executes

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Set Variable to value of another variable

Postby FrancescoT » Fri Aug 13, 2021 12:21 pm

You should to share a very minimal project that replicates the issue.
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 38 guests