Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] Frequently Asked Questions > Scripting
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 04-08-2003, 09:02 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
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%%")
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is On



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


Copyright © 1999-2023 Kinook Software, Inc.