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)
-   -   Macro value setting (https://www.kinook.com/Forum/showthread.php?t=3965)

citect 03-12-2009 01:31 AM

Macro value setting
 
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/Ma...xpressions.htm
http://www.kinook.com/VisBuildPro/Ma...scriptmisc.htm
http://www.kinook.com/VisBuildPro/Ma...osproperty.htm


All times are GMT -5. The time now is 04:29 AM.


Copyright © 1999-2023 Kinook Software, Inc.