Kinook Software Forum

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

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-10-2004, 04:53 PM
feiock feiock is online now
Registered User
 
Join Date: 02-10-2004
Posts: 3
Removing line returns in Visual Build

In my failure step, I call a VBscript where I pass the system macro
%LASTSTEP_OUTPUT%. Unfortuneatly some 3rd party apps we use put line returns in their error messages. This causes the string that is in %LASTSTEP_OUTPUT% to also contain these line returns. So then when my script is called, it is not able to accept the parameters correctly. Has anyone else come across this issue, and what did you do to get around it?

Thanks
Reply With Quote
  #2  
Old 02-10-2004, 05:34 PM
pjaquiery pjaquiery is online now
Registered User
 
Join Date: 01-20-2003
Location: Dunedin, New Zealand
Posts: 114
VBP gets a bit bent and twisted if you expand macros containing line ends because it tries to parse the expanded text and fails.

Use [vbld_AllMacros().Item("LASTSTEP_OUTPUT").Value] to insert the text instead.

I encounter this problem so much that I have a JScript function to do the job:

function GetStr (macroName)
{
var macro = Application.FindMacro (macroName);
if (macro == null)
return "";

return Application.ExpandMacros (macro);
}

so I would use [GetStr ("LASTSTEP_OUTPUT")].
Reply With Quote
  #3  
Old 02-10-2004, 06:01 PM
feiock feiock is online now
Registered User
 
Join Date: 02-10-2004
Posts: 3
I am pretty new to this product, so you might have to provide me with a little more detail. It looks like you are assigning the value of the macro directly to a variable inside your script...is this correct? If so, I guess you need some sort of add-in to tie Visual Build to the VB Script, because when I try it, it has no idea what I am trying to do. Also, I am running the regular version of VisBuild, not professional.

Thanks
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 07:49 PM.


Copyright © 1999-2023 Kinook Software, Inc.