View Single Post
  #2  
Old 07-01-2008, 01:07 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 5,742
Re: How to "OR" multiple macros in conditional build rules

Quote:
Originally posted by peiwai
I would like to "OR" multiple macros in the conditional build rule, so that the execution of an action can be depended on a collection of macros. For example, either Complete_Build "OR" Partial_Build is defined.

Is this possible? Would you please show me the syntax? I found that if I put "," bewteen macros, I can "AND" the macros. However, I haven't found a way to "OR" them.
Use a script expression. For instance:

[Not vbld_AllMacros()("Completed_Build") Is Nothing Or Not vbld_AllMacros()("Partial_Build") Is Nothing]

http://www.visualbuild.com/Manual/scriptexpressions.htm

Quote:
Also, how can I flip the value of a macro between true and false. For example "Not" Complete_Build?
In a Run Script action (VBScript):

Set m = vbld_TempMacro("Completed_Build")
m.Value = Not m.Value
Reply With Quote