Kinook Software Forums

Kinook Software Forums (http://www.kinook.com/Forum/index.php)
-   Scripting (http://www.kinook.com/Forum/forumdisplay.php?f=35)
-   -   How can I access macros containing newlines within script code? (http://www.kinook.com/Forum/showthread.php?t=51)

kinook 04-08-2003 10:02 AM

How can I access macros containing newlines within script code?
 
Referencing a macro containing newlines and quote characters (i.e., "%LASTSTEP_OUTPUT%") from script code can result in errors. This happens because the macros are expanded before the script is evaluated, and most script languages don't allow newlines within string expressions (and quote characters denote the end of a string).

Instead, use the macro values in code without expanding to string literals:

Code:

vbld_AllMacros()("LASTSTEP_OUTPUT")
If the macro value could reference other macros and/or script expressions, use

Code:

Application.ExpandMacrosAndScript("%%LASTSTEP_OUTPUT%%")


All times are GMT -5. The time now is 05:23 PM.


Copyright 1999-2019 Kinook Software, Inc.