home *** CD-ROM | disk | FTP | other *** search
/ Global Amiga Experience / globalamigaexperience.iso / graphic / video_presentation / titler_presentation / interplay / rexx / test.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1995-07-10  |  3.1 KB  |  156 lines

  1. /*
  2.     INTERPLAY AREXX COMMAND TEST SCRIPT
  3.  
  4.     Copyright (c) 1994 Optonica Limited
  5.     Written by Kevin Stevens
  6. */
  7.  
  8. ADDRESS TOIPPORT
  9.  
  10. /* change these variables to test the different AREXX functionality */
  11. pagetest = 0
  12. mediatest = 0
  13. boxtest = 1
  14.  
  15.  
  16. if pagetest ~= 0 then do
  17.     PAGE TYPE
  18.     say 'Error = ' INTERPLAY.ERROR
  19.  
  20.     PAGE NAME
  21.     say 'Error = ' INTERPLAY.ERROR
  22.  
  23.     PAGE NUMBER
  24.     say 'Error = ' INTERPLAY.ERROR
  25.  
  26.     PAGE GOTO 2
  27.     say 'Error = ' INTERPLAY.ERROR
  28.     end
  29.  
  30.  
  31. if mediatest ~= 0 then do
  32.     MEDIACLIP hd1:test/test.mclip
  33.     say 'Error = ' INTERPLAY.ERROR
  34.     end
  35.  
  36.  
  37. if boxtest ~= 0 then do
  38.     count = 0
  39.     do while count >= 0
  40.         count = count + 1
  41.         BOX TYPE count
  42.         boxtype = INTERPLAY.ERROR
  43.         select
  44.             when boxtype = 'EMPTY' then do
  45.                 say 'EMPTY = ' count
  46.  
  47.                 BOX ACTIVE count
  48.                 if INTERPLAY.ERROR ~= count then
  49.                     say "Can't activate box " count
  50.                 end
  51.  
  52.             when boxtype = 'BACKGROUND' then do
  53.                 BOX INFO count
  54.                 say 'BACKG = ' INTERPLAY.ERROR
  55.                 end
  56.  
  57.             when boxtype = 'IMAGE' then do
  58.                 BOX INFO count
  59.                 say 'IMAGE = ' INTERPLAY.ERROR
  60.                 end
  61.  
  62.             when boxtype = 'TITLE' then do
  63.                 BOX INFO count
  64.                 say 'TITLE = ' INTERPLAY.ERROR
  65.                 do 2
  66.                     do subbox = 1 to 4
  67.                         BOX ACTIVE count subbox
  68.                         end
  69.                     do subbox = 4 to 1 BY -1
  70.                         BOX ACTIVE count subbox
  71.                         end
  72.                     end
  73.                 end        /* play with sub-boxes */
  74.  
  75.             when boxtype = 'TEXT' then do
  76.                 do 2
  77.                     do subbox = 1 to 4
  78.                         BOX ACTIVE count subbox
  79.                         end
  80.                     do subbox = 4 to 1 BY -1
  81.                         BOX ACTIVE count subbox
  82.                         end
  83.                     end        /* play with sub-boxes */
  84.  
  85.                 BOX INFO count                    /* get text file name */
  86.                 say 'TEXT  = ' INTERPLAY.ERROR
  87.  
  88.                 TEXT LINE TOTAL                /* get no of lines in text file */
  89.                 say 'LINES = ' INTERPLAY.ERROR
  90.  
  91.                 TEXT LINE DISPLAY                /* get no of lines in box display */
  92.                 say 'DISPLAY = ' INTERPLAY.ERROR
  93.  
  94.                 TEXT LINE             /* get current top line number */
  95.                 say 'TOP LINE = ' INTERPLAY.ERROR
  96.  
  97.                 TEXT ADD 1 'Hello Mum 2!'            /* add text AFTER line 1 */
  98.                 TEXT ADD 0 'Hello Mum 1!'            /* add text BEFORE line 1 */
  99.                 TEXT ADD '-1' 'Hello Mum 3!'        /* add text at end */
  100.                 say 'add line = ' INTERPLAY.ERROR
  101.  
  102.                 lineno = INTERPLAY.ERROR + 1
  103.                 TEXT LINE lineno    /* get the text for a line */
  104.                 say 'TEXT LINE' lineno '=' INTERPLAY.ERROR
  105.  
  106.                 TEXT DOWN 2                        /* scroll text up & down */
  107.                 TEXT UP 1
  108.                 BOX SELECT count 2        /* select text UP gadget */
  109.  
  110.                 TEXT FILE 'hd1:text/IP_FeatureList.txt'    /* display a NEW text file */
  111.                 end
  112.  
  113.             when boxtype = 'LIST' then do
  114.                 LIST TEXT 
  115.                 say 'TEXT = ' INTERPLAY.ERROR
  116.  
  117.                 LIST NUMBER 
  118.                 say 'ITEM NO = ' INTERPLAY.ERROR
  119.  
  120.                 LIST DOWN 10
  121.                 LIST UP 5
  122.  
  123.                 LIST ITEMS
  124.                 say 'ITEMS = ' INTERPLAY.ERROR
  125.  
  126.                 listno = 0
  127.                 do while listno >= 0
  128.                     listno = listno + 1
  129.                     LIST TEXT listno
  130.                     if( INTERPLAY.ERROR == '' ) then do
  131.                         listno = -1
  132.                         end
  133.                     else do
  134.                         say 'ITEM' listno 'TEXT = "'||INTERPLAY.ERROR||'"'
  135.                         end
  136.                     end
  137.                 end
  138.  
  139.             when boxtype = 'ANIM' then do
  140.                 BOX INFO count
  141.                 say 'TEXT  = ' INTERPLAY.ERROR
  142.                 end
  143.  
  144.             when boxtype = '' then do
  145.                 count = -1
  146.                 end
  147.  
  148.             otherwise do
  149.                 say 'UNKNOWN BOX TYPE = ' boxtype
  150.                 end
  151.             end
  152.         end
  153.     end
  154.  
  155. exit
  156.