PDA

View Full Version : Macro value setting


citect
03-12-2009, 01:31 AM
I try to set the value of a macro from the value of another macro. I using the "Set macro" step i.e

macro1 value = %macro2%

Macro2 value is "file://///S-BUSINESS/S-Bus%%20Global%%20Support/DRIVERS/Bundled%%20Packs/PowerLogic/PowerLogic_41604004_BETA_SITEID_22280.zip"


I want the value of macro1 to be the same as the value of macro2. I expect to see the double % characters but instead I single % characters and therefore I get the error "error parsing macros"

How can preserve the double % when setting micro1?

kinook
03-12-2009, 10:33 AM
[vbld_EscapeString("%macro1%")]

or

[vbld_EscapeString(vbld_AllMacros()("macro1").Value)]

or a Run Script step with VBScript code like

Application.Macros(vbldMacroTypeTemporary).Add "macro2", vbld_AllMacros()("macro1").Value

http://www.kinook.com/VisBuildPro/Manual/scriptexpressions.htm
http://www.kinook.com/VisBuildPro/Manual/sysscriptmisc.htm
http://www.kinook.com/VisBuildPro/Manual/macrosproperty.htm