Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-13-2005, 05:00 PM
wrenczes wrenczes is online now
Registered User
 
Join Date: 06-13-2005
Posts: 1
macro expansion within a message log

Hi -

I've got a loop that is extracting strings from perforce comments and loads them into a macro one at a time, which I'm trying to dump out in a Message log, ie in the "message to log" field, I have:

The next entry is %macro%

This fails when %macro% contains a '[' character (Error parsing scripts: unrecoverable parse error at position xxx - expecting "]") . In order to fix the literal problem with the character, I tried changing the entry to this:

The next entry is [vbld_EscapeString(%macro%)]

but this fails as well.

Any ideas?
Reply With Quote
  #2  
Old 06-14-2005, 06:36 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
The value in %macro% will be expanded (evaluated for macro %% or script [] references) before being passed to vbld_EscapeString, and the value returned from vbld_EscapeString will in turn be evaluated for macros and script. You need to escape the string (double literal percent and bracket chars within it) when assigning it to the macro value. In a Run Script step, it would be

Application.Macros(vbldMacroTemporary).Add "macro", vbld_EscapeString(abc)

where abc is a variable containing the raw value to be assigned.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 Off



All times are GMT -5. The time now is 03:46 AM.


Copyright © 1999-2023 Kinook Software, Inc.