Incrementing Numeric Variable

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
tpreston
Newbie
Posts: 4
Joined: Fri Mar 06, 2009 10:31 pm

Incrementing Numeric Variable

Post by tpreston » Sat Mar 07, 2009 7:05 pm

What am I doing wrong here? The following script never executes the contents of the ELSE statement?

LET DELAY_TIME=1
LABEL SCAN
IF DELAY_TIME(is less than)6
LET DELAY_TIME=DELAY_TIME+1
ELSE
MessageModal>RESETTING DELAY TIME.
LET DELAY_TIME=0
ENDIF
GOTO SCAN

Of course, the (is less than) is really the left arrow symbol, but when I try to use it in this forum the message format gets botched.

Please help - Tom
Last edited by tpreston on Sat Mar 07, 2009 7:28 pm, edited 10 times in total.

tpreston
Newbie
Posts: 4
Joined: Fri Mar 06, 2009 10:31 pm

Post by tpreston » Sat Mar 07, 2009 7:08 pm

OK...FIGURED IT OUT. tHIS PROGRAM IS VERRY PARTICULAR (SOMETIMES) ABOUT THE ">" SYMBOL AFTER THE COMMAND.
Last edited by tpreston on Sat Mar 07, 2009 7:47 pm, edited 1 time in total.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sat Mar 07, 2009 7:38 pm

Try this:

Code: Select all

LET>DELAY_TIME=1
LABEL>SCAN
IF>%DELAY_TIME%<6
   LET>DELAY_TIME=%DELAY_TIME%+1
   ELSE
   MessageModal>RESETTING DELAY TIME.
   LET>DELAY_TIME=0
ENDIF
GOTO>SCAN
Disable the HTML on the postings to enable the "" chars
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

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