beautypg.com

Gasboy CFN III Manager Manual V3.6 User Manual

Page 215

background image

MDE-4871 CFN III Manager’s Manual for Windows® XP Embedded - Version 3.6 · August 2010

Page 20-3

How to Use the IF Command

Advanced Command Files

When using the IF statement the next line must not wrap into the following line or the system
will bypass the first command line and pick up the second line and only execute it. For
example:
IF (condition)

pause;a ~10~14Switch Drawers~0AInsert new drawer containing
$%M1 ‘
~0APress Enter to continue

The system will bypass the pause;a ... command line and only execute the ~0APress Enter to
continue line.

It is possible to link the Boolean options together with “and” and “or”. An & (ampersand) is
the AND operator and an | (pipe or vertical bar) is the OR operator.

The & and | functions are evaluated left to right:

• & terminates when the first false result is obtained
• | terminates when the first true result is obtained

Avoid using both & and | in the same IF statement because your result may not be what you
expect.

-!e filename

With the -!e switch the next argument is treated as a file name.

• If the file does not exist, the commands following the IF statement are

executed.

• If it exists, the commands following the IF statement are skipped, and, if an

ELSE follows, the commands following ELSE are executed. (Unless the
command is executed upon a file in the current directory, filename must
include the path.)

Switch

Function

This manual is related to the following products: