View Single Post
Old 16th August 2017, 01:09   #44682  |  Link
mrcorbo
Registered User
 
Join Date: Jan 2005
Posts: 171
Quote:
Originally Posted by ryrynz View Post
Hey Asmodian, ATM I'm using a bunch of these single commands and it's fine but I'd like to tidy it up and have as a single command with an OR or whatever.

if (srcHeight <= 480) and (filepath = "D:\Video\Anime\*.*") "Anime 480"
if (srcHeight <= 480) and (filepath = "D:\Video\Cartoons\*.*") "Anime 480"

I basically want

if (srcHeight <= 480) and (filepath = "D:\Video\Anime\*.*") or (filepath = "D:\Video\Cartoons\*.*") "Anime 480"

What's the proper syntax to achieve it? Cheers.
if (srcHeight <= 480) and ((filepath = "D:\Video\Anime\*.*") or (filepath = "D:\Video\Cartoons\*.*")) "Anime 480"

That should work. You want filepath A OR B to be tested first for True/False and then have that result AND srcHeight tested to both be True to activate the profile. The extra parentheses around the filepath clauses should do this.
mrcorbo is offline   Reply With Quote