home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / UTILS2 / X10XA2.ZIP / DEMO.CMD < prev    next >
OS/2 REXX Batch file  |  1994-01-15  |  21KB  |  670 lines

  1. DISPLAY OFF
  2.  
  3.  W A R N I N G:
  4.  ========================================
  5.  Please don't alter this file. 
  6.  
  7.  Also, don't copy statements from this file for programming your own 
  8.  command files. Special characters have been embedded which may cause
  9.  erratic behavior in your command files.
  10.  
  11. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.                          Welcome to the XA demo!
  25.  
  26. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  27.   This quick tour will highlight many of the features of XA.  To get
  28.   the most power from XA, please read the User's Guide (XA_201.TXT). 
  29.  
  30. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  31.   Features of XA Version 2.1
  32.  
  33. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  34.     * Sends DIRECT (immediate) and EVENT (scheduled) X10 commands via 
  35.         DOS prompt, batch file, or command file.
  36.     * User configurable - Works with any COM port (interrupt or polled mode).
  37.     * Automatic and complete CP-290 schedule maintenance.
  38.     * Sunrise and Sunset calculations, automatic DST adjustments.
  39.     * Synchronization of the CP-290 or PC onboard clocks.
  40.     * Program an event to occur any DATE in the future.
  41.     * PowerFail Recovery, restores modules to programmed state.
  42.     * Interface to external conditions via I/O ports.
  43.     * Monitoring and logging CP-290 activity.
  44.     * Powerful programming language (IF/ELSE, variables, logic operations,
  45.         GOTO, GOSUB/RETURN, INPORT/OUTPORT)
  46.  
  47. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  48.  
  49.    XA is copyrighted 1991-1994 by Bruce Christensen. All Rights Reserved.
  50. pause
  51.  
  52. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.   What is XA?
  63.  
  64. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  65.   XA is a command interpreter for the CP-290, X10's Computer Interface.
  66.   The XA interpreter translates English-like sentences into commands that
  67.   are understood by the CP-290.  XA parses commands from a variety of inputs.
  68.   XA can read commands from the DOS prompt.  The following example turns
  69.   on an X10 module whose address is set at House A Unit 9:
  70.  
  71. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  72.         C:\> XA "A9 ON"
  73. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  74.  
  75.    You can embed X10 commands within batch files too:
  76. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  77.  
  78.         PHONE.BAT:
  79.              XA "A9 ON"
  80.              CALL PRODIGY
  81.              XA "A9 OFF"
  82. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  83.  
  84.    X10 commands entered from the DOS prompt or batch file must be enclosed in
  85.    "quotation marks".  Multiple X10 commands may be entered, they must be
  86.    separated by "quotations" too.
  87.  
  88. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  89.         C:\> XA "A9 ON" "A10 OFF" "C3 DIM 50"
  90. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  91. pause
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  104.   Command Files
  105. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  106.  
  107.   Another input for X10 statements is the command file (*.CMD).  This file
  108.   can hold an unlimited number of commands that are executed sequentially
  109.   by XA.  For instance, you can create a "script" of X10 commands to control
  110.   Christmas lights.  You tell XA which file to read as follows:
  111.  
  112. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  113.         C:\> XA F=XMAS.CMD
  114. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  115.   
  116.   where XMAS.CMD contains the following commands:
  117.  
  118. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  119.              A1 DIM 
  120. DISPLAY OFF DELAY 0:0:1 DISPLAY ON
  121.              A2 BRIGHT 
  122. DISPLAY OFF DELAY 0:0:1 DISPLAY ON
  123.              A3 OFF
  124. DISPLAY OFF DELAY 0:0:1 DISPLAY ON
  125.              A4 ON
  126. DISPLAY OFF DELAY 0:0:1 DISPLAY ON
  127. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  128.  
  129.   XA offers many special commands that allow you to create very sophisticated
  130.   script files.  Some of these commands include:
  131. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  132.              IF/ELSE/ENDIF, GOTO, GOSUB/RETURN, 
  133.                    PAUSE, DELAY secs, TIMER secs,  ...plus many others. 
  134.  
  135. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  136.   See the User's Manual for complete details.
  137. pause
  138.  
  139.  
  140.  
  141.  
  142.  
  143. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  144.   Event Scheduling
  145. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  146.  
  147.  
  148.  
  149.  
  150.   While XA is great for sending immediate commands to your CP-290, XA really
  151.   excels at scheduling and maintaining events. Events are X10 commands stored
  152.   in the CP-290's memory and activated at some future time.  As with direct
  153.   commands, events may be programmed from the DOS prompt:
  154.  
  155. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  156.       C:\> XA "A9 ON TIME 8:00 PM WEEKDAYS"
  157. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  158.  
  159.   Event statements are usually stored in command files.  A command file may 
  160.   contain your entire X10 event schedule.  You can have XA download your 
  161.   complete schedule for you automatically.  If you control your personal
  162.   computer with an X10 Appliance Module, then you can have XA perform 
  163.   automatic event downloads on a weekly basis.  See the section entitled
  164.   "POWERUP Utility" in the User's Guide for complete details.
  165.  
  166.  
  167. pause
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180. The following is an example of an X10 event file called XA.CMD:
  181.  
  182. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  183.         C:\> XA F=XA.CMD
  184.  
  185.                 :
  186.             PORCH_LIGHTS ON SUNSET EVERYDAY
  187.             PORCH_LIGHTS OFF SUNRISE EVERYDAY
  188.             DECK_LIGHTS ON DUSK DATE 5/1 THRU 9/30 WEEKDAYS
  189.                 :
  190.  
  191. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  192.   Notice how more descriptive names may be substituted for module 
  193.   house and unit codes.  PORCH_LIGHTS have been "DEFINED" (or substituted) 
  194.   for the module address House A Unit 9.  
  195.   
  196.   XA supports dynamic instances such as sunrise and sunset.  These times 
  197.   are calculated based on your latitude and longitude.  
  198.   
  199.   XA is also capable of evaluating dates and storing an event when the 
  200.   statement meets the proper criteria. XA allows you to program an event 
  201.   weeks, months, or years into the future.
  202.  
  203.  
  204. pause
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  216.   Configurable Communications
  217. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.   XA supports COM1 through COM4 using either interrupt-driven (preferred mode)
  225.   or polled communications.  A utility program called FINDX10 is included which
  226.   will analyze your installed COM ports and search for the CP-290.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.   
  234.   To run FINDX10...
  235.  
  236. pause
  237.  
  238.  
  239.  
  240.  
  241.  
  242. DOS FINDX10 !
  243.  
  244.   If the last message reads: 
  245. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  246.           "Found CP-290 at COMx. Use IO xxx IRQ xxx" 
  247. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  248.      then you're in luck. XA should work on your PC without any problems.
  249.      Note: You will be instructed to run FINDX10 later to setup XA's
  250.            initialization file (XA.INI).
  251.  
  252.   If the last message reads: 
  253. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  254.             "Can not locate the CP-290..." 
  255. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  256.      you may have problems running XA. Later on, try connecting the CP-290
  257.      to a different COM port and then run FINDX10 again. 
  258. pause
  259. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  272.   Initialization File (XA.INI)
  273. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  274.  
  275.   In addition to using command files, XA also reads a file called XA.INI. This
  276.   is an initialization file where you store XA statements that describe the 
  277.   setup of your machine. For instance, the IO and IRQ tokens that FINDX10 
  278.   suggested to you should be placed in this file. Here is a sample of other
  279.   XA tokens that would normally appear in XA.INI:
  280.  
  281. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  282.         DEFINE PORCH_LIGHTS HOUSE A UNIT 9 
  283.         DEFINE DECK_LIGHTS HOUSE A UNIT 1
  284.  
  285.         LATITUDE  41°35'                   # Coordinates of
  286.         LONGITUDE 81°20'                   # Mentor, Ohio
  287.         TIMEZONE 5 DST                     # used for Sunrise/sunset calcs
  288.  
  289.         COM3                               # For "standard" COM configurations
  290.         IO 3E8H                            # For "special"...
  291.         IRQ 5                              # ... COM configurations
  292.  
  293. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  294.   A sample XA.INI is included with this software. You can modify it to suit 
  295.   your configuration. Also, the User's Guide contains complete information
  296.   about "tokens" and the initialization file. Please read it!
  297. pause
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  305.   Powerfail Recovery
  306. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  307.  
  308.   XA can be used to restore all CP-290 controlled modules back to their 
  309.   programmed state in the event of a power failure, or other circumstance. 
  310.   The proper state is determined by examining the CP-290's event schedule. 
  311.  
  312. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  313.     C:\> XA -p
  314.  
  315. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  316.        Powerfail Recovery. Checking status...
  317. DISPLAY OFF VIDEO6 YELLOW BLUE DELAY 0:0:1 DISPLAY ON
  318.        Restoring: PORCH_LIGHTS ON
  319.        Restoring: DECK_LIGHTS OFF
  320.        Ignoring : DEHUMIDIFIER
  321.        Forcing  : HALL_LIGHTS ON
  322. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  323.  
  324.   XA allows selected modules (DEHUMIDIFIER) to be excluded from recovery,
  325.   others (HALL_LIGHTS) can forced to a particular state no matter what XA 
  326.   determines. 
  327.  
  328.  
  329. pause
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  337.   Special DATE handling
  338. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  339.  
  340.   Events can be programmed to occur on specific dates or between a range of 
  341.   dates. Events can also be excluded from occuring on specific (or range of) 
  342.   dates. The following examples show how you can control lighting during 
  343.   specific dates. 
  344.   
  345.   Turn on flagpole light on July 4:
  346. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  347.       FLAGPOLE ON SUNSET DATE 7/4
  348. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  349.  
  350.   Turn on flagpole on multiple holidays:
  351. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  352.       FLAGPOLE ON SUNSET DATE 5/31 DATE 7/4 DATE 9/6
  353. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  354.  
  355.   Turn on porch lights only during the winter season:
  356. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  357.       PORCH_LIGHTS ON TIME 5:30 DATE 11/1/93 THRU 3/31/94 WEEKDAYS
  358. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  359.  
  360.   Turn on porch lights EXCEPT during certain holidays:
  361. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  362.       PORCH_LIGHTS ON TIME SUNSET EXCEPT DATE 5/31 DATE 7/4 DATE 9/6 WEEKDAYS
  363. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  364.  
  365.   Turn on deck lights during summer EXCEPT during vacation:
  366. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  367.       DECK_LIGHTS ON TIME SUNSET DATE 4/1 THRU 9/30 EXCEPT DATE 7/1 THRU 7/14
  368. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  369.  
  370. pause
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  378.   Report Generation
  379. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  380.  
  381.   XA can produce report files (XA.RPT) of your X10 schedule in (2) special 
  382.   formats. The first style lists events sorted by day and time:
  383.  
  384. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  385.   Saturday - January 01, 1994       Sunrise:  7:52:05      Sunset:  5:05:09           
  386.  
  387.      Time      Cmd    Mode         Module Address/Description           Event 
  388.    --------    ---  --------       ----------------------------------   ------
  389.    12:30 am     OFF                (A8) LIVING_ROOM_LAMP                ( 41) 
  390.    12:30 am     OFF                (A4) FAMILY_ROOM_LAMP                ( 43) 
  391.     1:30 am     OFF                (A3) BEDROOM_LIGHT                   ( 54) 
  392.     6:00 am     ON                 (B2) DEHUMIDIFIER                    ( 56)*
  393.     7:22 am     OFF                (H1) STAIRS                          ( 63)*
  394.     7:22 am     OFF                (H2) HALLWAY                         ( 63)*
  395.    12:00 pm     OFF                (B2) DEHUMIDIFIER                    ( 57)*
  396.     4:05 pm     ON                 (A4) FAMILY_ROOM_LAMP                ( 51) 
  397.     4:56 pm     ON                 (B2) DEHUMIDIFIER                    ( 58)*
  398.     5:05 pm     DIM                (A6) OUTSIDE_PORCH_LIGHTS            ( 48) 
  399.     5:06 pm     DIM                (H1) STAIRS                          ( 61)*
  400.     5:06 pm     DIM                (H2) HALLWAY                         ( 60)*
  401. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  402.  
  403. pause
  404.  
  405.   The second style lists events sorted by day, module, and time:
  406.  
  407. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  408.   Saturday - January 01, 1994       Sunrise:  7:52:05      Sunset:  5:05:09           
  409.  
  410.    Module       Time  Function  Mode                                    Event 
  411.    ---------------------------------------------------------------------------
  412.  
  413.    (A3) BEDROOM_LIGHT
  414.               1:30 am     OFF                                           ( 54) 
  415.              10:34 pm     ON                                            ( 53) 
  416.  
  417.    (A4) FAMILY_ROOM_LAMP
  418.              12:30 am     OFF                                           ( 43) 
  419.               4:05 pm     ON                                            ( 51) 
  420.  
  421.    (A6) OUTSIDE_PORCH_LIGHTS
  422.               5:05 pm     DIM                                           ( 48) 
  423.               5:22 pm     DIM                                           ( 70) 
  424.              10:40 pm     OFF                                           ( 55) 
  425.  
  426. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  427.  
  428. pause
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  436.   Clock Synchronization
  437. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  438.  
  439.   XA can keep the internal clocks of your PC and CP-290 accurate to within 
  440.   1 second of each other. You can set either clock based on the time 
  441.   maintained by the other clock. 
  442.  
  443.   If your PC does not have on-board clock, you can set its time based on the
  444.   time maintained by the CP-290. Simply put the following statement in your
  445.   AUTOEXEC.BAT file:
  446.  
  447. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  448.        XA "SYNCHRONIZE PC"        
  449. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  450.  
  451.   To get both clocks accurate to within 1 second:
  452. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  453.  
  454.        XA "SYNCHRONIZE PC EXACT"        
  455. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  456.  
  457.    You can also set the CP-290 based on your PC's internal clock. 
  458.  
  459. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  460.        XA "SYNCHRONIZE X10"        
  461.        XA "SYNCHRONIZE X10 EXACT"        
  462. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  463.  
  464. pause
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  475.   Monitoring and Logging CP-290 Activity
  476. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  477.  
  478.   XA can monitor all activity reported by the CP-290. For instance, when
  479.   the CP-290 triggers an scheduled event, or when one of the buttons on 
  480.   the CP-290 console is pressed, XA captures the action and displays the
  481.   activity on your screen.  XA can also log this information in a file
  482.   if requested:
  483.  
  484. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  485.    C:\> XA "MONITOR"
  486.  
  487.    Monitor events. Press <ESC> when finished...
  488.  
  489.       Sat Jan 01  2:16:02 1994 (D1...D16) ALL UNITS OFF
  490.       Sat Jan 01  3:00:02 1994 (C1) COMPUTER ON 
  491.       Sat Jan 01 16:02:02 1994 (A4) FAMILY_ROOM_LAMP ON
  492.       Sat Jan 01 16:02:05 1994 (A8) LIVING_ROOM_LAMP ON
  493.       Sat Jan 01 17:16:02 1994 (A9) PORCH ON
  494.       Sat Jan 01 18:00:02 1994 (C8) KATHRYNS_PC OFF
  495. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  496.  
  497. pause
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  509.   Powerup Utility
  510. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  511.  
  512.   A utility program called POWERUP.EXE is supplied with XA which assists 
  513.   you in performing unattended, automatic, event downloads to the CP-290.
  514.   As long as your PC is controlled by an Appliance Module, you can have
  515.   the CP-290 boot your computer at some predetermined time (for instance,
  516.   Sunday mornings @ 3:00 am). Your AUTOEXEC.BAT file can call POWERUP which
  517.   determines if its the proper time to perform a schedule update.
  518.  
  519.   Here are the statements required in AUTOEXEC.BAT to perform automatic 
  520.   schedule updates:
  521.  
  522. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  523.          :
  524.     POWERUP d=SUN s=2:55 e=3:05 
  525.     if errorlevel == 1 goto update
  526.     goto skip
  527.     :update
  528.     XA f=XA.CMD
  529.     XA "PC OFF"
  530.     :skip
  531. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  532.  
  533. pause
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  544.   Registration Benefits
  545. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  546.  
  547.   When you register your copy of XA, you will be sent a floppy disk which
  548.   enables the following items:
  549. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  550.  
  551.     * IF / ELSE / ENDIF Statements
  552.     * Logical, Boolean, and Arithmetic operators
  553.     * Pre-defined variables (CDAY, CDATE, and CTIME)
  554.     * Interaction with I/O ports (ex. joystick) to send X10 commands. 
  555. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  556.  
  557.   These additions allow you to write specialized script and event files.
  558.   The next few screens will give you some ideas.
  559.  
  560.  
  561.  
  562. pause
  563. DISPLAY OFF VIDEO6 LIGHTGRAY BLACK DISPLAY ON
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575. DISPLAY OFF VIDEO6 WHITE BLACK DISPLAY ON
  576.   IF / ELSE / ENDIF 
  577. DISPLAY OFF VIDEO6 LIGHTGRAY BLACK DISPLAY ON
  578.  
  579.   These constructs allow you to alter the flow of execution within your 
  580.   event command file or script file based on conditions you program.
  581.   In addition, XA allows you to customize the color of the conditional 
  582.   statements so you can easily tell how the statement was evaluated. 
  583.   For instance, assuming today is Sunday, you can have XA test the CDAY 
  584.   variable and if it's the WEEKEND have XA parse a special WEEKEND 
  585.   event file. Note that the IF test is TRUE so it is displayed in
  586.   GREEN colors, the ELSE is FALSE, so it is displayed in RED:
  587. DISPLAY OFF VIDEO6 LIGHTGRAY BLACK DISPLAY ON
  588.  
  589.  
  590. DISPLAY OFF VIDEO6 GREEN BLACK DISPLAY ON
  591.        IF ((CDAY == SAT) OR (CDAY == SUN))
  592. DISPLAY OFF VIDEO6 LIGHTGRAY BLACK DISPLAY ON
  593.          XACMD WEEKEND.CMD
  594. DISPLAY OFF VIDEO6 RED BLACK DISPLAY ON
  595.        ELSE
  596. DISPLAY OFF VIDEO6 LIGHTGRAY BLACK DISPLAY ON
  597.          XACMD WEEKDAY.CMD
  598. DISPLAY OFF VIDEO6 GREEN BLACK DISPLAY ON
  599.        ENDIF
  600.  
  601. DISPLAY OFF VIDEO6 LIGHTGRAY BLACK DISPLAY ON
  602.  
  603.  
  604.  
  605. pause  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  614.   Input and Output from a Port
  615. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  616.  
  617.   XA allows you to use your joystick port, LPT port, or any other port
  618.   as a general purpose Input/Output port.  Connect switches and/or
  619.   relays to these ports and program XA to react to real-world events.
  620.   The following code appears in the included file JOYSTICK.CMD:
  621. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  622.  
  623.    :LOOP                                   # This is the beginning of the loop
  624.       GAME = INPORT 201H                   # Read the joystick port
  625.       IF !(GAME & 20H)                     # Check Button A
  626.         IF (MODULE == OFF)                 # If module is currently Off...
  627.           c2 on fast                       # ...Turn module C2 On
  628.           MODULE = ON                      # ...update status of module to On
  629.         ENDIF
  630.       ENDIF
  631.  
  632.       IF !(GAME & 10H)                     # Check Button B
  633.         IF (MODULE == ON)                  # If module is currently On...
  634.           c2 off fast                      # ...Turn module C2 Off
  635.           MODULE = OFF                     # ...update its status too
  636.         ENDIF
  637.       ENDIF
  638.    GOTO LOOP                               # Loop until <ESC> pressed.
  639. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  640. pause  
  641.  
  642.  
  643.  
  644.  
  645.   
  646.  
  647. DISPLAY OFF VIDEO6 WHITE BLUE DISPLAY ON
  648.   Now it's your turn
  649. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  650.  
  651.   This is just a sample of what XA can do with your CP-290.  Please take
  652.   the time to read the accompanying User's Guide to learn all of XA's
  653.   capabilities.  
  654.  
  655.   XA is SHAREWARE. If you continue to use XA beyond the 45 trial period, 
  656.   you need to register this package with the author. Registration brings
  657.   additional benefits including very powerful programming constructs, and
  658.   a printed User's Guide.  
  659.  
  660.   Thank you for trying XA!  Send any correspondence to:
  661.  
  662. DISPLAY OFF VIDEO6 YELLOW BLUE DISPLAY ON
  663.   Bruce Christensen                       CompuServe    :  73201,1531
  664.   6594 Hudson Ave.                        Prodigy       :  MHNC39A
  665.   Mentor, OH. 44060-4545                  America OnLine:  AuggieBen
  666.  
  667. DISPLAY OFF VIDEO6 LIGHTGRAY BLUE DISPLAY ON
  668.  
  669. pause
  670.