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)
-   -   Conditional build step (multiple conditions) (https://www.kinook.com/Forum/showthread.php?t=2800)

ericp 07-16-2007 03:48 PM

Conditional build step (multiple conditions)
 
Hi,

I've been struggling with this for the past few hours, and I figure I'll ask the group.

I've got a build step that I only want to build when 'arg1' and 'arg2' are both set to false (so essentially a NOR statement)

I've tried the expression as: [%arg1%] NOR [%arg2%] (drop down = is true)
Also: %arg1% NOR %arg2% (drop down = is true)

When I run the build file, the group gets executed when Arg1 = 1/True, and ignores whatever Arg2 is set to.

I'm using v6.1 at the moment.

(ps: I've just tried changing the operator from NOR to AND, and the same occurs, it seems to ignore the Arg2 parameter).

I'm sure that it's something simple that I"m forgetting to do...

Thanks in advance!

Eric.

ericp 07-16-2007 04:11 PM

Resolved:

[Application.FindMacro("arg1").Value = "False" AND Application.FindMacro("arg2").Value = "False"]

works.

Follow-up: Is there a less "convoluted" method of doing this?

kinook 07-17-2007 10:43 AM

It looks fairly straightforward to me. You can shorten it up a bit:

["%arg1%" = "False" And "%arg2%" = "False"]

or

[Not %arg1% And Not %arg2%]

or

[Not (%arg1% Or %arg2%)]

Shiamak 05-13-2013 04:56 PM

Is word for using "OR operator is OR...or pipe (||) ?

kinook 05-13-2013 06:11 PM

In VBScript, OR is the logical OR operator. For other languages, it can be something else.
http://msdn.microsoft.com/en-us/libr...=vs.84%29.aspx


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


Copyright © 1999-2023 Kinook Software, Inc.