Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-05-2005, 02:17 PM
jblocksom jblocksom is online now
Registered User
 
Join Date: 07-29-2005
Location: Springfield, VA
Posts: 6
Question Comparing two macros

I have two macros, call them A and B, with strings in them and I want a group to run only if they are not equal. I can't figure out how to get that right. In the conditional build rule, I have the macro/expression field set to
%A% <> %B%
and the condition set to is true. This skips it every time. If I enclose the expression in square brackets, it gives a macro error. What is the trick to this?
Reply With Quote
  #2  
Old 08-05-2005, 02:24 PM
jblocksom jblocksom is online now
Registered User
 
Join Date: 07-29-2005
Location: Springfield, VA
Posts: 6
OK, I've narrowed down the problem a bit more. When I do
["%A%" = "%B%"]
as the expression, it works, but only if A and B do not have multiple lines. The real data I need to compare has multiple lines. Anybody have a way to compare multi line strings or strip the newlines before the compare?
Reply With Quote
  #3  
Old 08-05-2005, 03:15 PM
kevina kevina is online now
Registered User
 
Join Date: 03-27-2003
Posts: 825
Quoting a macro like this: "%MACRONAME%" when the macro contains multiple lines is the equivalent of "some value
" which is not valid vbscript.

You need to do something like this instead: [vbld_AllMacros()("A").Value = vbld_AllMacros()("B").Value] which uses vbld_AllMacros() to evaluate the macro and provide access to the entire value as a string.
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 Off



All times are GMT -5. The time now is 02:27 AM.


Copyright © 1999-2023 Kinook Software, Inc.