mathematical expressions

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
esuohlluf
Junior Coder
Posts: 41
Joined: Thu Mar 23, 2006 5:33 am

mathematical expressions

Post by esuohlluf » Thu Mar 23, 2006 5:37 am

I downloaded Macro Scheduler for evaluation, and I am having trouble with mathematical expressions.

for this macro....
*****************
//Recorded Events
Let>WW_TIMEOUT=5
CapsOff
Let>X=400
Let>A=X+100
Let>text=A
Message>text
******************
the result was 500 as expected

But for this macro...
******************
//Recorded Events
Let>WW_TIMEOUT=5
CapsOff
Let>X=400
Let>A=(X+100)/2
Let>text=A
Message>text
******************
the message box display the expression itself (displays (X+100)/2) instead of the numerical result.

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

Post by Marcus Tettmar » Thu Mar 23, 2006 7:47 am

Hi,

For complex expressions you need to use { } syntax. See Complex Expressions in the help file. Your code should look like this to make it work:

//Recorded Events
Let>WW_TIMEOUT=5
CapsOff
Let>X=400
Let>A={(%X%+100)/2}
Let>text=A
Message>text
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
Sign up to our newsletter for free automation tips, tricks & discounts