Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] General Discussion (https://www.kinook.com/Forum/forumdisplay.php?f=2)
-   -   Comparing two macros (https://www.kinook.com/Forum/showthread.php?t=1187)

jblocksom 08-05-2005 02:17 PM

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?

jblocksom 08-05-2005 02:24 PM

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?

kevina 08-05-2005 03:15 PM

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.


All times are GMT -5. The time now is 01:49 AM.


Copyright © 1999-2023 Kinook Software, Inc.