Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] General Discussion (https://www.kinook.com/Forum/forumdisplay.php?f=2)
-   -   More nested values (https://www.kinook.com/Forum/showthread.php?t=1298)

MikePeterson 09-26-2005 05:39 PM

More nested values
 
I have several macros containing build numbers with corresponding builds that read which build number they're supposed to use from an ini file.

For example,

Ini:
BuildNum=SP2_BUILDS

Bld:
BUILDNUM macro = %READ_INI(%INIFILE%,Settings,BuildNum,DEFAULT)%

So, at this point, BUILDNUM = SP2_BUILDS. Now SP2_BUILDS is another macro that will get incremented by this script and as an example, has a current value of 25.

How can I use the BUILDNUM macro in other macros (i.e. Version = 1.0.%BUILDNUM%) where ultimately I get the expansion of SP2_BUILDS - 1.0.25 - instead of 1.0.SP2_BUILDS?

Thanks.

kinook 09-26-2005 05:47 PM

http://www.kinook.com/Forum/showthre...?threadid=1249

MikePeterson 09-27-2005 12:37 PM

Thanks for the quick response. I'd actually looked at that post as well as one other and implemented it incorrectly. I've tried this again but I must be doing something wrong.

Here's my first Set Macro step:

BUILDNUM macro = %READ_INI(%INIFILE%,Settings,BuildNum,DEFAULT)%

In a second Set Macro step I've tried to set the macro version to:

1.0.[vbld_AllMacros().Item("BUILDNUM").Value]

and

1.0.[Application.ExpandMacros("%%%%BUILDNUM%%%%")]

and both yield 1.0.SP2_BUILDS for the value of version instead of 1.0.25.

Can you tell me what I've done wrong?

Thanks.

kinook 09-27-2005 01:38 PM

If I understand correctly, you could use

1.0.[Application.ExpandMacros("%%%BUILDNUM%%%")]

MikePeterson 09-27-2005 01:55 PM

SWEET!!! Thank you.

Would you be so kind as to explain the significance of the number of % signs as I haven't been able to find anything in Help or in the User's Manual.

Thanks again!!!

kinook 09-27-2005 02:08 PM

http://visualbuild.com/Manual/?hints.htm -- see 4th bullet


All times are GMT -5. The time now is 10:30 PM.


Copyright © 1999-2023 Kinook Software, Inc.