Complex Expression

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

Complex Expression

Post by kpassaur » Thu Mar 09, 2006 5:53 pm

I have a sample that worked with number as variables; however, if I use the same code and change it to any value it dosn't

Here are samples the first works, the second appears to and the thrid does not work


////////////////////////////Test One
Let>w=1
Let>x=1
Let>y=1
Let>z=2

If>{(%w%=1) AND (%x%=1) AND (%y%=1) AND (%z%=1)}
MDL>They all equal 1
Else
MDL>They dont all equal 1
Endif


/////////////////////////////Test Two ------- Seems to Work
Let>w=1
Let>x=1
Let>y=1
Let>z=1

If>{(%w%>,) AND (%x%=1) AND (%y%=1) AND (%z%=1)}
MDL>They all equal 1
Else
MDL>They dont all equal 1
Endif

//////////////////////////////Test Three
Let>w=1
Let>x=1
Let>y=1
Let>z=1

If>{(%w%>,) AND (%x%>,) AND (%y%=1) AND (%z%=1)}
MDL>They all equal 1
Else
MDL>They dont all equal 1
Endif

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Mar 09, 2006 5:57 pm

Hi,

The comma is not a valid numeric value. So you are comparing numbers with strings and will get an error. Complex expressions need the period (".") for the decimal place holders - maybe that is the problem?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts