home *** CD-ROM | disk | FTP | other *** search
/ Current Shareware 1994 January / SHAR194.ISO / graphuti / ripcodes.zip / STRUCTOF.RIP
Text File  |  1993-10-29  |  161KB  |  4,085 lines

  1. =====================================================================
  2. ==              RIPscrip PROTOCOL - GENERAL STRUCTURE              ==
  3. =====================================================================
  4.  
  5. This document describes RIPscrip commands up through version 1.53.00 of
  6. the RIPscrip Protocol Specification.
  7.  
  8. RIPscrip is organized into 10 levels of graphical commands (low Level-0
  9. to high Level-9).  Level-0 commands are the building blocks of RIPscrip.
  10. The basic graphics primitives of the system are all Level-0, including
  11. the commands Line, Rectangle, Circle, Color, Font, etc.  Each level of
  12. RIPscrip gets progressively higher-level in concept.  For example,
  13. Level-1 commands use Mouse Regions, Icons, and Formatted Text Regions.
  14.  
  15. The basic syntax rules are as follows:
  16.  
  17. 1.  A RIPscrip command line starts at the beginning of a line of text.
  18.     A RIPscrip command line moved to the middle of a line of text is
  19.     treated as literal text. This prevents people inserting mischievous
  20.     things in teleconference messages, or similar pranks.  The only
  21.     exceptions to this rule is stated below under item 6, "continuation
  22.     of long lines", and item 12 "alternate RIPscrip starting sequences".
  23.  
  24. 2.  A RIPscrip command line begins with an exclamation mark (!).
  25.  
  26. 3.  Every RIPscrip command is preceded by the universal RIPscrip
  27.     delimiter, vertical-bar (|)
  28.  
  29. 4.  Individual RIPscrip commands may be combined on the same line
  30.     providing they are separated by the vertical bar delimiter.
  31.  
  32. 5.  RIPscrip commands or command lines may be split across multiple
  33.     lines with a backslash (\) just before each split.  This helps
  34.     RIPscrip commands conform to right margins and escape word wrapping.
  35.  
  36.           An example:
  37.  
  38.                !|c02|L02030405|P0901020102010201020102\
  39.                0102010201020102
  40.  
  41. 6.  RIPscrip must allow for normal text to be intermixed with
  42.     RIPscrip commands.  If unrecognized text appears after a RIPscrip
  43.     command, on the same line, the text is ignored (the command is not
  44.     ignored).  A line that does not begin with "!|" is considered raw
  45.     text and is routed to the TTY text window (see "8" below).
  46.  
  47. 7.  RIPscrip makes provisions for a Graphical Window and a Text
  48.     Window.  The Graphical Window is where all RIPscrip graphics appear.
  49.     The Text Window is where raw text appears.  Raw Text includes ANSI
  50.     color and cursor movement codes (a subset of VT-100 terminal
  51.     emulation).
  52.  
  53. 8.  The vertical bar (|) of a RIPscrip command can be followed by a
  54.     level number.  If the 1st character after (|) is a numeric digit
  55.     (1-9), then that's the RIPscrip Command Level.  If the very 1st
  56.     character is NOT a digit 1-9, then it is the command type character
  57.     and the command is a Level-0 command.  If the 1st character is a
  58.     digit 1-9, and the second character is also a digit, then that
  59.     defines a sub-level of a RIPscrip level.  For example:
  60.  
  61.           !|L     RIPscrip Level-0 Command "L"
  62.          !|1L     RIPscrip Level-1 Command "L"
  63.         !|15L     RIPscrip Level-1, sub-level 5 Command "L"
  64.  
  65.     Each of the above examples are unique commands not to be confused
  66.     with each other.  You may continue the sub-levels up to a maximum
  67.     level of 9 (e.g., !|123456789<cmd>").
  68.  
  69. 9.  Every RIPscrip command includes a command type character.  In
  70.     Level-0 commands, this character immediately follows the vertical
  71.     bar.  At all other levels, it follows the level digits.  The command
  72.     type character may be any printable non-decimal-digit character.
  73.  
  74. 10. Following the command type character are 0 or more parameters.
  75.     If the command requires a text-string, it is always the LAST
  76.     parameter.  Numeric parameters DO NOT have any delimiters (commas,
  77.     dashes, spaces, etc.).  A variable width numeric parameter may be
  78.     used as the last parameter.  This allows for maximum efficiency.
  79.     Numbers are represented in base-36.  This compacts numbers down to
  80.     roughly 3/5 of their decimal form.  This numbering system,
  81.     technically called "Hexa-Tri-Decimal", has affectionately been dubbed
  82.     "MegaNums".  Unlike Hexadecimal which uses 0-9, A-F, MegaNums take
  83.     advantage of the entire alphabet, using characters 0-9 and A-Z.
  84.  
  85. 11. An exclamation mark (!) or vertical bar (|) character can appear
  86.     in a RIPscrip text parameter by preceding it with a backslash(\).  A
  87.     literal backslash is represented with a double-backslash (\\).
  88.  
  89. 12. A RIPscrip sequence CAN begin in a column other than column #0,
  90.     if the exclamation mark prefix is replaced with a Ctrl-A (Start Of
  91.     Header [SOH]) character, or Ctrl-B (STX) character.  Since 99.9% of
  92.     all BBS' do not allow users to enter most control characters, users
  93.     will be unable to begin RIPscrip sequences in the middle of a command
  94.     line.  Only the host should be able to do this.  This prevents people
  95.     from cluttering  teleconference, or other areas of a host with
  96.     spurious RIPscrip sequences.
  97.  
  98.  
  99.  
  100. ANSI SEQUENCES
  101. --------------
  102. RIPscrip predominantly uses non-ANSI command sequences.  In a couple of
  103. situations though, an ANSI sequence is allowed to perform a specific
  104. function.  There are currently three separate ANSI sequences defined in
  105. the RIPscrip protocol to perform various actions.  They are as follows:
  106.  
  107. ESC[!     Query RIPscrip version number.  RIPterm will respond with
  108.           RIPSCRIPxxyyzz where xx is equal to the major version
  109.           number (zero padded), yy is equal to the minor version
  110.           number (zero padded), and zz equals the revision code (also
  111.           zero padded).  For v1.53.00, the returned sequence would be
  112.           RIPSCRIP015300.  Another example, v1.23.45 would return
  113.           RIPSCRIP012345.
  114.  
  115. ESC[0!    Same as ESC [ ! (see above)
  116.  
  117. ESC[1!    Disables all RIPscrip processing.  Any RIPscrip sequences are
  118.           interpreted as raw text.
  119.  
  120. ESC[2!    Enabled RIPscrip processing.  Any RIPscrip sequences will be
  121.           parsed and processed.
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128. =====================================================================
  129. ==                    RIPscrip COMMAND REFERENCE                   ==
  130. =====================================================================
  131.  
  132. The remainder of this document details the RIPscrip command set.
  133. Each command has these aspects:
  134.  
  135.     SYMBOL - the symbolic constant that is referenced in the
  136.              RIPscrip API Library code.  This is  the universal
  137.              name for the command.
  138.  
  139.      LEVEL - The Command Level.  Sub-levels are represented
  140.              with decimal points (eg, 1.3.5 for Level-1,
  141.              Sub-level 3, Sub-Sub-level 5).  This is for
  142.              discussion purposes only.  The decimal points
  143.              are never part of the actual command.
  144.  
  145.    COMMAND - The command type character identifying the
  146.              command
  147.  
  148.  ARGUMENTS - The arguments or parameters for the command.
  149.              Commands that do not require any arguments
  150.              after the command type character are shown
  151.              here as "<none>".  Each argument is shown in
  152.              the order it appears in the command, and is
  153.              represented by a name.  If an argument is
  154.              numeric, it is followed by a width specifier
  155.              indicating how many MegaNum digits the
  156.              argument consists of.  (eg, ":2" means a
  157.              2-digit MegaNum, or a value between 0 and
  158.              1295).  If an argument does not have a width
  159.              specifier, it is by default a text argument,
  160.              and should be the last argument on the line.
  161.              If a command is variable length (see POLYGON),
  162.              then it will appear with ellipses (...)
  163.  
  164.     FORMAT - This represents the format of the command, with
  165.              the starting "!|", the level digits, the
  166.              command type character, and the argument list,
  167.              with the argument names in angle brackets.
  168.              (These arguments are spaced apart, but these
  169.              spaces never appear in the physical commands.)
  170.  
  171.    EXAMPLE - An actual example of the RIPscrip command.
  172.  
  173. DRAW COLOR - If YES, then this command uses or affects the
  174.              current Drawing Color.
  175.  
  176. LINE PATRN - If YES, then this command uses or affects the
  177.              current Line Style Pattern.
  178.  
  179. LINE THICK - If YES, then this command uses or affects the
  180.              current Line Style Thickness
  181.  
  182. FILL COLOR - If YES, then this command uses or affects the
  183.              current Fill Color.
  184.  
  185. FILL PATRN - If YES, then this command uses or affects the
  186.              current Fill Pattern.
  187.  
  188. WRITE MODE - If YES, then this command will take advantage
  189.              of the current Write Mode (eg, COPY, or XOR).
  190.  
  191. FONT SIZES - If YES, then this command uses or affects the
  192.              current Font Size.
  193.  
  194.  
  195.  
  196.  
  197.  
  198. RIP_TEXT_WINDOW
  199. ---------------
  200.          Function:  Define the size and location of the Text Window
  201.             Level:  0
  202.           Command:  w
  203.         Arguments:  x0:2, y0:2, x1:2, y1:2, wrap:1, size:1
  204.            Format:  !|w <x0> <y0> <x1> <y1> <wrap> <size>
  205.           Example:  !|w00001B0M10
  206.   Uses Draw Color:  NO
  207. Uses Line Pattern:  NO
  208.   Uses Line Thick:  NO
  209.   Uses Fill Color:  NO
  210. Uses Fill Pattern:  NO
  211.   Uses Write Mode:  NO
  212.   Uses Font Sizes:  NO
  213.  
  214. This command specifies the dimensions of the virtual TTY window that will
  215. display all ASCII/ANSI (non-RIPscrip) data coming across the connection.
  216. (x0,y0) defines the upper-left corner of the window in text-based
  217. character- cell coordinates.  (x1,y1) defines the lower-right corner of
  218. the window (inclusive).  There may be two simultaneous windows on the
  219. screen, one for TTY text, and one for the display of RIPscrip graphics (a
  220. viewport), and they may overlap.
  221.  
  222. Bytes received over the modem are first checked for RIPscrip commands.
  223. All bytes that don't conform to the RIPscrip syntax are treated as
  224. ANSI/ASCII and displayed in the TTY window (if defined). User keystrokes
  225. that are echoed by the BBS would also appear in the text window by this
  226. scheme.
  227.  
  228. The text window may be made invisible, ignoring all non-RIPscrip bytes,
  229. by setting all RIP_TEXT_WINDOW parameters to zero (0).  The X and Y
  230. parameters ranges vary depending on the setting of the <size> parameter
  231. which governs the font size used for the output text. Valid settings for
  232. the <size> parameter and the ranges for X/Y values are as follows:
  233.  
  234.         Size   Font Size   X Range  Y Range
  235.         ------------------------------------------
  236.          0     8x8          0-79     0-42
  237.          1     7x8          0-90     0-42
  238.          2     8x14         0-79     0-24
  239.          3     7x14         0-90     0-24
  240.          4     16x14        0-39     0-24
  241.  
  242. The <wrap> parameter applies to both the horizontal and vertical
  243. dimensions.  If <wrap> is set to 1, then any text that extends beyond the
  244. right margin of the window will wrap to the next line of the window,
  245. scrolling the window up if necessary.  If <wrap> is 0, then any text
  246. going beyond the right margin is truncated and no scrolling is performed;
  247. the cursor remains at the right margin.
  248.  
  249. NOTE:  If the text window currently being defined is identical to the
  250.        currently defined text window, the cursor will not be relocated
  251.        to the upper-left corner of the window. The only aspect of the
  252.        text window that can be different and still be deemed
  253.        "identical" is the <wrap> parameter.  For the current and new text
  254.        windows to be considered identical, the parameters <x0>, <y0>,
  255.        <x1>, <y1> and <size> must be the same.
  256.  
  257.  
  258.  
  259. RIP_VIEWPORT
  260. ------------
  261.          Function:  Define the size and location of the Graphics Window
  262.             Level:  0
  263.           Command:  v
  264.         Arguments:  x0:2, y0:2, x1:2, y1:2
  265.            Format:  !|v <x0> <y0> <x1> <y1>
  266.           Example:  !|v00002E1M
  267.   Uses Draw Color:  NO
  268. Uses Line Pattern:  NO
  269.   Uses Line Thick:  NO
  270.   Uses Fill Color:  NO
  271. Uses Fill Pattern:  NO
  272.   Uses Write Mode:  NO
  273.   Uses Font Sizes:  NO
  274.  
  275. This command defines the (X,Y) pixel boundaries of the RIPscrip graphics
  276. window, which will contain all RIPscrip graphics output. ASCII/ANSI text
  277. will be displayed in the virtual TTY window defined by the
  278. RIP_TEXT_WINDOW command above.  (x0,y0) defines the upper-left corner of
  279. the graphics viewport, and (x1,y1) defines the lower-right corner
  280. (inclusive).  The viewport may be disabled, so RIPscrip graphics commands
  281. are ignored, by setting all parameters to zero (0).
  282.  
  283. Graphics displayed in the viewport is "truncated" at this rectangular
  284. border, meaning if a circle would normally extend outside one of the
  285. borders, it will be chopped, only displaying the portion of the circle
  286. that is contained inside the viewport boundaries.
  287.  
  288. Coordinates are specified based on a 640x350 pixel resolution, meaning X
  289. can be anywhere from 0 - 639, and Y can be anywhere from 0 - 349. x0 must
  290. be less than x1 and y0 must be less than y1 unless all parameters are set
  291. to zero, indicating that the graphics window is disabled.
  292.  
  293.  
  294.  
  295. RIP_RESET_WINDOWS
  296. -----------------
  297.          Function:  Clear Graphics & Text Windows and reset to full screen
  298.             Level:  0
  299.           Command:  *
  300.         Arguments:  <none>
  301.            Format:  !|*
  302.           Example:  !|*
  303.   Uses Draw Color:  NO
  304. Uses Line Pattern:  NO
  305.   Uses Line Thick:  NO
  306.   Uses Fill Color:  NO
  307. Uses Fill Pattern:  NO
  308.   Uses Write Mode:  NO
  309.   Uses Font Sizes:  NO
  310.  
  311. This command will set the Text Window to a full 80x43 EGA hi-res text
  312. mode, place the cursor in the upper left corner, clear the screen, and
  313. zoom the Graphics Window to full 640x350 EGA screen.  Both windows are
  314. filled with the current graphics background color.  Also, all Mouse
  315. Regions are deleted and the Clipboard is erased.  A system might use this
  316. function before entering a text only mode that does not support RIP
  317. commands.  This command will also restore the default 16-color RIP
  318. palette (see RIP_SET_PALETTE below).
  319.  
  320.  
  321.  
  322. RIP_ERASE_WINDOW
  323. ----------------
  324.          Function:  Clears the Text Window to the current background color
  325.             Level:  0
  326.           Command:  e
  327.         Arguments:  <none>
  328.            Format:  !|e
  329.           Example:  !|e
  330.   Uses Draw Color:  NO
  331. Uses Line Pattern:  NO
  332.   Uses Line Thick:  NO
  333.   Uses Fill Color:  NO
  334. Uses Fill Pattern:  NO
  335.   Uses Write Mode:  NO
  336.   Uses Font Sizes:  NO
  337.  
  338. This clears the TTY text window to the current graphics background color
  339. and positions the cursor in the upper-left corner of the window.  If the
  340. text window is inactive, then this command is ignored.  If the text and
  341. graphics windows overlap, then this command will clear the overlapping
  342. portion also.
  343.  
  344.  
  345.  
  346. RIP_ERASE_VIEW
  347. --------------
  348.          Function:  Clear Graphics Window to current background color
  349.             Level:  0
  350.           Command:  E
  351.         Arguments:  <none>
  352.            Format:  !|E
  353.           Example:  !|E
  354.   Uses Draw Color:  NO
  355. Uses Line Pattern:  NO
  356.   Uses Line Thick:  NO
  357.   Uses Fill Color:  NO
  358. Uses Fill Pattern:  NO
  359.   Uses Write Mode:  NO
  360.   Uses Font Sizes:  NO
  361.  
  362. This command clears the Graphics Viewport to the current graphics
  363. background color.  If the graphics viewport is not active (if the
  364. boundaries are 0,0,0,0), then this command is ignored.  If the text and
  365. graphics windows overlap, then this command will clear the overlapping
  366. portion also.
  367.  
  368.  
  369.  
  370. RIP_GOTOXY
  371. ----------
  372.          Function:  Move text cursor to row & column in Text Window
  373.             Level:  0
  374.           Command:  g
  375.         Arguments:  x:2, y:2
  376.            Format:  !|g <x> <y>
  377.           Example:  !|g0509
  378.   Uses Draw Color:  NO
  379. Uses Line Pattern:  NO
  380.   Uses Line Thick:  NO
  381.   Uses Fill Color:  NO
  382. Uses Fill Pattern:  NO
  383.   Uses Write Mode:  NO
  384.   Uses Font Sizes:  NO
  385.  
  386. This command sets the position of the text cursor in the TTY Text window,
  387. if it is active.  If inactive (if the dimensions are 0,0,0,0), then this
  388. command is ignored.  This command is equivalent to the ANSI/VT-100
  389. command goto x/y, <Esc>[x;yH, except that the coordinates of that ANSI
  390. command are 1-based and the coordinates of this RIPscrip command are
  391. 0-based.
  392.  
  393.  
  394.  
  395. RIP_HOME
  396. --------
  397.          Function:  Move cursor to upper-left corner of Text Window
  398.             Level:  0
  399.           Command:  H
  400.         Arguments:  <none>
  401.            Format:  !|H
  402.           Example:  !|H
  403.   Uses Draw Color:  NO
  404. Uses Line Pattern:  NO
  405.   Uses Line Thick:  NO
  406.   Uses Fill Color:  NO
  407. Uses Fill Pattern:  NO
  408.   Uses Write Mode:  NO
  409.   Uses Font Sizes:  NO
  410.  
  411. This command positions the text cursor to the upper-left corner in the
  412. TTY Text Window, if it is active.
  413.  
  414.  
  415.  
  416. RIP_ERASE_EOL
  417. -------------
  418.          Function:  Erase current text line from the cursor to end of line
  419.             Level:  0
  420.           Command:  >
  421.         Arguments:  <none>
  422.            Format:  !|>
  423.           Example:  !|>
  424.   Uses Draw Color:  NO
  425. Uses Line Pattern:  NO
  426.   Uses Line Thick:  NO
  427.   Uses Fill Color:  NO
  428. Uses Fill Pattern:  NO
  429.   Uses Write Mode:  NO
  430.   Uses Font Sizes:  NO
  431.  
  432. This command will erase the current text line in the TTY text window from
  433. the current cursor location (inclusive) to the end of the line. The
  434. erased region is filled with the current graphics background color.  This
  435. differs from the ANSI command ESC[K which clears the area with the
  436. current ANSI background color.
  437.  
  438.  
  439.  
  440. RIP_COLOR
  441. ---------
  442.          Function:  Set the current Drawing Color for graphics primitives
  443.             Level:  0
  444.           Command:  c
  445.         Arguments:  color:2
  446.            Format:  !|c <color>
  447.           Example:  !|cA
  448.   Uses Draw Color:  YES
  449. Uses Line Pattern:  NO
  450.   Uses Line Thick:  NO
  451.   Uses Fill Color:  NO
  452. Uses Fill Pattern:  NO
  453.   Uses Write Mode:  NO
  454.   Uses Font Sizes:  NO
  455.  
  456. This command sets the color for drawing lines, circles, arcs, rectangles,
  457. and other graphics primitives, as well as the color for drawing
  458. graphics-text from the RIP_TEXT class of commands (not from ASCII/ANSI
  459. text).  This command does not affect Fill colors or Fill Patterns (see
  460. below).  It does affect the borders of graphic objects, for example the
  461. border of an ellipse drawn with the RIP_FILLED_OVAL command.  (The
  462. interior of the ellipse would be drawn according to the most recent
  463. RIP_FILL_STYLE command.)
  464.  
  465. This command chooses one of the colors of the 16-color RIP palette
  466. defined by the RIP_SET_PALETTE.  Here is the default 16-color RIP
  467. palette:
  468.  
  469.      Value   Color
  470.      -------------------------------------------------------
  471.      00      Black (00 is always the background color)
  472.      01      Blue
  473.      02      Green
  474.      03      Cyan
  475.      04      Red
  476.      05      Magenta
  477.      06      Brown
  478.      07      Light Gray
  479.      08      Dark Gray
  480.      09      Light Blue
  481.      0A      Light Green
  482.      0B      Light Cyan
  483.      0C      Light Red
  484.      0D      Light Magenta
  485.      0E      Yellow
  486.      0F      White
  487.  
  488.  
  489.  
  490. RIP_SET_PALETTE
  491. ---------------
  492.          Function:  Set 16-color RIP Palette from master 64-color palette
  493.             Level:  0
  494.           Command:  Q
  495.         Arguments:  c1:2, c2:2, ... c16:2
  496.            Format:  !|Q <c1> <c2> ... <c16>
  497.           Example:  !|Q000102030405060708090A0B0C0D0E0F
  498.   Uses Draw Color:  YES
  499. Uses Line Pattern:  NO
  500.   Uses Line Thick:  NO
  501.   Uses Fill Color:  NO
  502. Uses Fill Pattern:  NO
  503.   Uses Write Mode:  NO
  504.   Uses Font Sizes:  NO
  505.  
  506. This command modifies the 16-color RIP palette by choosing from the 64
  507. colors in the master palette.  This allows you to alter the colors in
  508. your RIPscrip graphics scenes.  Once a Set Palette command is processed,
  509. any colors on the screen that had their corresponding palette entries
  510. changed will instantly switch to the new color set. You may obtain color
  511. cycling effects by using this command.  The default 16-color RIP palette
  512. is restored by the RIP_RESET_WINDOWS command.  The default 16-color RIP
  513. palette is:
  514.  
  515.     16-Color RIP Palette     Master 64-Color EGA
  516.         Color Code           Palette Color Code       Color
  517.     ---------------------------------------------------------------
  518.            00                     0  (00)             Black
  519.            01                     1  (01)             Blue
  520.            02                     2  (02)             Green
  521.            03                     3  (03)             Cyan
  522.            04                     4  (04)             Red
  523.            05                     5  (05)             Magenta
  524.            06                     7  (06)             Brown
  525.            07                     20 (0K)             Light Gray
  526.            08                     56 (1K)             Dark Gray
  527.            09                     57 (1L)             Light Blue
  528.            0A                     58 (1M)             Light Green
  529.            0B                     59 (1N)             Light Cyan
  530.            0C                     60 (1O)             Light Red
  531.            0D                     61 (1P)             Light Magenta
  532.            0E                     62 (1Q)             Yellow
  533.            0F                     63 (1R)             White
  534.  
  535. Color 00 of the 16-color RIP palette is always the background color
  536. (which is typically Black, or color 00 of the 64-color EGA palette).
  537.  
  538.  
  539.  
  540. RIP_ONE_PALETTE
  541. ---------------
  542.          Function:  Set color of 16-color RIP Palette from Master Palette
  543.             Level:  0
  544.           Command:  a
  545.         Arguments:  color:2 value:2
  546.            Format:  !|a <color> <value>
  547.           Example:  !|a051B
  548.   Uses Draw Color:  YES
  549. Uses Line Pattern:  NO
  550.   Uses Line Thick:  NO
  551.   Uses Fill Color:  NO
  552. Uses Fill Pattern:  NO
  553.   Uses Write Mode:  NO
  554.   Uses Font Sizes:  NO
  555.  
  556. This command changes one color in the 16-color palette.  The color number
  557. is sent along with the new color value from the Master Color Palette. The
  558. color <value> must be in the range of 0-63.  Once a Set One Palette
  559. command is processed, any colors on the screen that correspond to the
  560. <color> number will be changed instantly to the new color value.  You may
  561. obtain color cycling effects by using this command.  The default RIP
  562. palette is restored when by RIP_RESET_WINDOWS.
  563.  
  564.     16-Color RIP Palette     Master 64-Color EGA
  565.         Color Code           Palette Color Code       Color
  566.     ---------------------------------------------------------------
  567.            00                     0  (00)             Black
  568.            01                     1  (01)             Blue
  569.            02                     2  (02)             Green
  570.            03                     3  (03)             Cyan
  571.            04                     4  (04)             Red
  572.            05                     5  (05)             Magenta
  573.            06                     7  (06)             Brown
  574.            07                     20 (0K)             Light Gray
  575.            08                     56 (1K)             Dark Gray
  576.            09                     57 (1L)             Light Blue
  577.            0A                     58 (1M)             Light Green
  578.            0B                     59 (1N)             Light Cyan
  579.            0C                     60 (1O)             Light Red
  580.            0D                     61 (1P)             Light Magenta
  581.            0E                     62 (1Q)             Yellow
  582.            0F                     63 (1R)             White
  583.  
  584. Color 00 of the 16-color RIP palette is always the background color
  585. (which is typically Black, or color 00 of the 64-color EGA palette).
  586.  
  587.  
  588.  
  589. RIP_WRITE_MODE
  590. --------------
  591.          Function:  Set drawing mode for graphics primitives
  592.             Level:  0
  593.           Command:  W
  594.         Arguments:  mode:2
  595.            Format:  !|W <mode>
  596.           Example:  !|W00
  597.   Uses Draw Color:  NO
  598. Uses Line Pattern:  NO
  599.   Uses Line Thick:  NO
  600.   Uses Fill Color:  NO
  601. Uses Fill Pattern:  NO
  602.   Uses Write Mode:  YES
  603.   Uses Font Sizes:  NO
  604.  
  605. This command sets the current drawing mode for most of the graphics
  606. primitives:
  607.  
  608.      Mode   Description
  609.      ------------------------------------------
  610.      00     Normal drawing mode (overwrite)
  611.      01     XOR (complimentary) mode
  612.  
  613. In normal mode, things are drawn in the current drawing color over top of
  614. whatever is in the graphics viewport.  This is the typical mode of
  615. operation in a GUI environment.
  616.  
  617. In the XOR mode, instead of changing each pixel to the current drawing
  618. color, the pixel is inverted (black changes to white, red to green,
  619. etc.).  Drawing the same item a second time erases it completely.  This
  620. mode is useful for drawing something temporarily, or for animation.  The
  621. Rubber Band mode of most paint programs uses a mode like this.
  622.  
  623.  
  624.  
  625. RIP_MOVE
  626. --------
  627.          Function:  Move the current drawing position to (X,Y)
  628.             Level:  0
  629.           Command:  m
  630.         Arguments:  x:2, y:2
  631.            Format:  !|m <x> <y>
  632.           Example:  !|m0509
  633.   Uses Draw Color:  NO
  634. Uses Line Pattern:  NO
  635.   Uses Line Thick:  NO
  636.   Uses Fill Color:  NO
  637. Uses Fill Pattern:  NO
  638.   Uses Write Mode:  NO
  639.   Uses Font Sizes:  NO
  640.  
  641. This command moves the current graphics drawing cursor to (x,y).  You
  642. could use this to draw text at a certain point, but you'd probably use
  643. RIP_TEXT_XY instead.  This command is primarily provided for future
  644. development which will make use of its ability to relocate the current
  645. drawing position without physically drawing anything.
  646.  
  647.  
  648.  
  649. RIP_TEXT
  650. --------
  651.          Function:  Draw text in current font/color at current location
  652.             Level:  0
  653.           Command:  T
  654.         Arguments:  text-string
  655.            Format:  !|T <text-string>
  656.           Example:  !|Thello world
  657.   Uses Draw Color:  YES
  658. Uses Line Pattern:  NO
  659.   Uses Line Thick:  NO
  660.   Uses Fill Color:  NO
  661. Uses Fill Pattern:  NO
  662.   Uses Write Mode:  YES
  663.   Uses Font Sizes:  YES
  664.  
  665. This command displays text at the current location in the graphics
  666. window, as set with the RIP_MOVE command.  The text is also affected by
  667. the most recent settings of these commands:
  668.  
  669.      Command            Description of Command
  670.      -----------------------------------------------------------------
  671.      RIP_FONT_STYLE     font style (character set, direction, size)
  672.      RIP_WRITE_MODE     drawing mode (normal or XOR)
  673.      RIP_COLOR          drawing color (from the 16-color RIP palette)
  674.  
  675. The drawing position is placed at the end of the last character drawn.
  676.  
  677. The current drawing position is set immediately to the right of the drawn
  678. text.  Subsequent Line, Circle or other such commands will not affect
  679. this position.  This provides a means so that you can quickly do another
  680. RIP_TEXT command (presumably in another color) at a later time and have
  681. the text show up immediately after the previous text.
  682.  
  683.  
  684.  
  685. RIP_TEXT_XY
  686. -----------
  687.          Function:  Draw text in current font/color at specific location
  688.             Level:  0
  689.           Command:  @
  690.         Arguments:  x:2, y:2 and text-string
  691.            Format:  !|@ <x> <y> <text-string>
  692.           Example:  !|@0011hello world
  693.   Uses Draw Color:  YES
  694. Uses Line Pattern:  NO
  695.   Uses Line Thick:  NO
  696.   Uses Fill Color:  NO
  697. Uses Fill Pattern:  NO
  698.   Uses Write Mode:  YES
  699.   Uses Font Sizes:  YES
  700.  
  701. This command is an efficient combination of RIP_MOVE and RIP_TEXT. The
  702. text is drawn at the specified location according to the same settings as
  703. apply to RIP_TEXT (see above).
  704.  
  705. The current drawing position is set immediately to the right of the drawn
  706. text.  Subsequent Line, Circle or other such commands will not affect
  707. this position.  This provides a means so that you can quickly do another
  708. RIP_TEXT command (presumably in another color) at a later time and have
  709. the text show up immediately after the previous text.
  710.  
  711.  
  712.  
  713. RIP_FONT_STYLE
  714. --------------
  715.          Function:  Select the current font style, orientation and size
  716.             Level:  0
  717.           Command:  Y
  718.         Arguments:  font:2, direction:2, size:2, res:2
  719.            Format:  !|Y <font> <direction> <size> <res>
  720.           Example:  !|Y01000400
  721.   Uses Draw Color:  NO
  722. Uses Line Pattern:  NO
  723.   Uses Line Thick:  NO
  724.   Uses Fill Color:  NO
  725. Uses Fill Pattern:  NO
  726.   Uses Write Mode:  NO
  727.   Uses Font Sizes:  YES
  728.  
  729. This command sets the font, direction and size for RIP_TEXT commands.
  730.  
  731.      Font   Description of Font
  732.      ---------------------------------------------
  733.      00     Default 8x8 font            Bit-Mapped
  734.      01     Triplex Font                Scalable
  735.      02     Small Font                  Scalable
  736.      03     Sans Serif Font             Scalable
  737.      04     Gothic [Old English] Font   Scalable
  738.      05     Script Font                 Scalable
  739.      06     Simplex Font                Scalable
  740.      07     Triplex Script Font         Scalable
  741.      08     Complex Font                Scalable
  742.      09     European Font               Scalable
  743.      0A     Bold Font                   Scalable
  744.  
  745. For the Direction parameter, use 00 to indicate horizontal and 01 for
  746. vertical.
  747.  
  748. For the Size parameter, use 01 for the normal default size, 02 for x2
  749. magnification, 03 for x3 magnification, ... , and 0A for x10
  750. magnification.
  751.  
  752. NOTE:  The Default font is bit-mapped and looks best when drawn in
  753.        size 1.  In sizes greater than one, the individual pixels are
  754.        enlarged, giving a jagged look.  This may not be the desired
  755.        effect.  The fonts 1 - 4 are smooth scalable vector fonts.
  756.  
  757.  
  758.  
  759. RIP_PIXEL
  760. ---------
  761.          Function:  Draws a one pixel using current drawing color
  762.             Level:  0
  763.           Command:  X
  764.         Arguments:  x:2, y:2
  765.            Format:  !|X <x> <y>
  766.           Example:  !|X1122
  767.   Uses Draw Color:  YES
  768. Uses Line Pattern:  NO
  769.   Uses Line Thick:  NO
  770.   Uses Fill Color:  NO
  771. Uses Fill Pattern:  NO
  772.   Uses Write Mode:  NO
  773.   Uses Font Sizes:  NO
  774.  
  775. This command will draw a single pixel in the current drawing color at the
  776. given (x,y) graphics position.  This command is included for
  777. completeness, but in practice it would be extremely inefficient to make
  778. much use of it.
  779.  
  780.  
  781.  
  782. RIP_LINE
  783. --------
  784.          Function:  Draw a line in the current color/line style
  785.             Level:  0
  786.           Command:  L
  787.         Arguments:  x0:2, y0:2, x1:2, y1:2
  788.            Format:  !|L <x0> <y0> <x1> <y1>
  789.           Example:  !|L00010A0E
  790.   Uses Draw Color:  YES
  791. Uses Line Pattern:  YES
  792.   Uses Line Thick:  YES
  793.   Uses Fill Color:  NO
  794. Uses Fill Pattern:  NO
  795.   Uses Write Mode:  YES
  796.   Uses Font Sizes:  NO
  797.  
  798. This command will draw a line in the current drawing color, using the
  799. current line style, pattern and thickness.  The line is drawn from (x0,y0)
  800. to (x1,y1) in the graphics viewport.
  801.  
  802.  
  803.  
  804. RIP_RECTANGLE
  805. -------------
  806.          Function:  Draw a rectangle in current color/line style
  807.             Level:  0
  808.           Command:  R
  809.         Arguments:  x0:2, y0:2, x1:2, y1:2
  810.            Format:  !|R <x0> <y0> <x1> <y1>
  811.           Example:  !|R00010A0E
  812.   Uses Draw Color:  YES
  813. Uses Line Pattern:  YES
  814.   Uses Line Thick:  YES
  815.   Uses Fill Color:  NO
  816. Uses Fill Pattern:  NO
  817.   Uses Write Mode:  YES
  818.   Uses Font Sizes:  NO
  819.  
  820. This command draws a rectangle in the current drawing color, using the
  821. current line style, pattern and thickness.  (x0,y0) and (x1,y1) are any
  822. two opposing corners of the rectangle.  If x0=x1 or y0=y1 then the
  823. command will draw a single vertical or horizontal line.  The rectangle
  824. interior is not filled by RIP_RECTANGLE.
  825.  
  826.  
  827.  
  828. RIP_BAR
  829. -------
  830.          Function:  Draw solid, filled rectangle with fill color/pattern
  831.             Level:  0
  832.           Command:  B
  833.         Arguments:  x0:2, y0:2, x1:2, y1:2
  834.            Format:  !|B <x0> <y0> <x1> <y1>
  835.           Example:  !|B00010A0E
  836.   Uses Draw Color:  NO
  837. Uses Line Pattern:  NO
  838.   Uses Line Thick:  NO
  839.   Uses Fill Color:  YES
  840. Uses Fill Pattern:  YES
  841.   Uses Write Mode:  NO
  842.   Uses Font Sizes:  NO
  843.  
  844. This command fills a rectangular region with the current fill color and
  845. pattern.  No border is drawn.
  846.  
  847.  
  848.  
  849. RIP_CIRCLE
  850. ----------
  851.          Function:  Draw a circle in the current color and line thickness
  852.             Level:  0
  853.           Command:  C
  854.         Arguments:  x_center:2, y_center:2, radius:2
  855.            Format:  !|C <x_center> <y_center> <radius>
  856.           Example:  !|C1E180M
  857.   Uses Draw Color:  YES
  858. Uses Line Pattern:  NO
  859.   Uses Line Thick:  YES
  860.   Uses Fill Color:  NO
  861. Uses Fill Pattern:  NO
  862.   Uses Write Mode:  NO
  863.   Uses Font Sizes:  NO
  864.  
  865. This command draws a circle in the current drawing color and line
  866. thickness.  The <radius> is in pixel units.  This command understands
  867. aspect ratios and will draw a truly circular circle instead of an oblong
  868. circle (ellipse) like on other graphics systems.  The aspect ratio is
  869. currently based on the EGA 640x350 resolution and is understood by both
  870. the GUI designer and the Terminal Program.
  871.  
  872. NOTE:  This command uses the line thickness setting, but not the line
  873.        patterns.  In other words, you can draw a circle with a thick
  874.        or a thin border, but not a dashed or dotted border.
  875.  
  876.  
  877.  
  878. RIP_OVAL
  879. --------
  880.          Function:  Draw elliptical arc in the current color/line style
  881.             Level:  0
  882.           Command:  O
  883.         Arguments:  x:2, y:2, st_ang:2, end_ang:2, x_rad:2, y_rad:2
  884.            Format:  !|O <x> <y> <st_ang> <end_ang> <x_rad> <y_rad>
  885.           Example:  1E1A18003G150Z
  886.   Uses Draw Color:  YES
  887. Uses Line Pattern:  NO
  888.   Uses Line Thick:  YES
  889.   Uses Fill Color:  NO
  890. Uses Fill Pattern:  NO
  891.   Uses Write Mode:  NO
  892.   Uses Font Sizes:  NO
  893.  
  894. This command draws an elliptical arc similar to the circular RIP_ARC
  895. command.  The center of the ellipse is (x,y) and the arc is drawn
  896. starting from <st_ang> and proceeding counterclockwise to <end_ang> (see
  897. RIP_ARC above for details).
  898.  
  899. The X radius is half the full width of the ellipse, the Y radius is half
  900. the full height.  The ellipse is drawn according to the current line
  901. thickness, but the current line pattern has no effect.
  902.  
  903.  
  904.  
  905. RIP_FILLED_OVAL
  906. ---------------
  907.          Function:  Draw filled ellipse using current color/fill pattern
  908.             Level:  0
  909.           Command:  o
  910.         Arguments:  x_center:2, y_center:2, x_rad:2, y_rad:2
  911.            Format:  !|o <x_center> <y_center> <x_rad> <y_rad>
  912.           Example:  !|o1G2B0M0G
  913.   Uses Draw Color:  YES
  914. Uses Line Pattern:  NO
  915.   Uses Line Thick:  YES
  916.   Uses Fill Color:  YES
  917. Uses Fill Pattern:  YES
  918.   Uses Write Mode:  NO
  919.   Uses Font Sizes:  NO
  920.  
  921. This command draws a complete filled ellipse on the screen.  The interior
  922. of the ellipse is drawn using the current fill pattern and fill color.
  923. The outline of the ellipse is drawn using the current drawing color and
  924. line thickness.
  925.  
  926.  
  927.  
  928. RIP_ARC
  929. -------
  930.          Function:  Draw circular arc in current color/line thickness
  931.             Level:  0
  932.           Command:  A
  933.         Arguments:  x:2, y:2, start_ang:2, end_ang:2, radius:2
  934.            Format:  !|A <x> <y> <start_ang> <end_ang> <radius>
  935.           Example:  !|A1E18003G15
  936.   Uses Draw Color:  YES
  937. Uses Line Pattern:  NO
  938.   Uses Line Thick:  YES
  939.   Uses Fill Color:  NO
  940. Uses Fill Pattern:  NO
  941.   Uses Write Mode:  NO
  942.   Uses Font Sizes:  NO
  943.  
  944. This command draws a circular arc, or a segment of a circle.  Drawing
  945. begins at <start_ang> and terminates at <end_ang>.  The angles are
  946. represented starting at zero for the 3 o'clock position and increasing
  947. counterclockwise through a full circle to 360:
  948.  
  949. The arc drawing begins at the <start_angle> and continues counter-
  950. clockwise to the <end_angle>.  A full circle will be displayed if
  951. <start_ang>=0 and <end_ang>=360.  This command recognizes aspect ratios
  952. like the circle command does.  It does not take advantage of line
  953. patterns but does comply with line thickness.
  954.  
  955. If both angles are equal, nothing is drawn.
  956.  
  957.  
  958.  
  959. RIP_OVAL_ARC
  960. ------------
  961.          Function:  Draw an elliptical arc
  962.             Level:  0
  963.           Command:  V
  964.         Arguments:  x:2, y:2, st_ang:2, e_ang:2, radx:2 rady:2
  965.            Format:  !|V <x> <y> <st_ang> <e_ang> <radx> <rady>
  966.           Example:  !|V1E18003G151Q
  967.   Uses Draw Color:  YES
  968. Uses Line Pattern:  NO
  969.   Uses Line Thick:  YES
  970.   Uses Fill Color:  NO
  971. Uses Fill Pattern:  NO
  972.   Uses Write Mode:  NO
  973.   Uses Font Sizes:  NO
  974.  
  975. This command draws an elliptical arc, or a segment of an ellipse. Drawing
  976. begins at <st_ang> and terminates at <e_ang>.  The angles are represented
  977. starting at zero for 3 o'clock position and increasing counterclockwise
  978. through a full ellipse at 360 degrees:
  979.  
  980. The arc drawing begins at the <st_ang> and continues counterclockwise to
  981. the <e_ang>.  A complete ellipse will be displayed if <st_ang>=0 and
  982. <e_ang>=360.  This command does not utilize "aspect ratios" because of
  983. the nature of an Ellipse.  It does not take advantage of line patterns
  984. but does comply with line thickness.
  985.  
  986.  
  987.  
  988. RIP_PIE_SLICE
  989. -------------
  990.          Function:  Draws a circular pie slice
  991.             Level:  0
  992.           Command:  I
  993.         Arguments:  x:2, y:2, start_ang:2, end_ang:2, radius:2
  994.            Format:  !|I <x> <y> <start_ang> <end_ang> <radius>
  995.           Example:  !|I1E18003G15
  996.   Uses Draw Color:  YES
  997. Uses Line Pattern:  NO
  998.   Uses Line Thick:  YES
  999.   Uses Fill Color:  YES
  1000. Uses Fill Pattern:  YES
  1001.   Uses Write Mode:  NO
  1002.   Uses Font Sizes:  NO
  1003.  
  1004. This command draws a "pie slice".  The slice is circular.  It obeys all of
  1005. the same commands as the Arc command described above.  The ends of the
  1006. arc are connected to the Center-Point of the Arc with two straight
  1007. lines.  These two lines converge at the Center-Point.  The interior of
  1008. the Slice is filled with the current Fill Color and Pattern.  The
  1009. exterior (outline) of the Slice is drawn using the current drawing color
  1010. and line thickness.  The Line Pattern feature does not apply to this
  1011. command.
  1012.  
  1013.  
  1014.  
  1015. RIP_OVAL_PIE_SLICE
  1016. ------------------
  1017.          Function:  Draws an elliptical pie slice
  1018.             Level:  0
  1019.           Command:  i
  1020.         Arguments:  x:2, y:2, st_ang:2, e_ang:2, radx:2 rady:2
  1021.            Format:  !|i <x> <y> <st_ang> <e_ang> <radx> <rady>
  1022.           Example:  !|i1E18003G151Q
  1023.   Uses Draw Color:  YES
  1024. Uses Line Pattern:  NO
  1025.   Uses Line Thick:  YES
  1026.   Uses Fill Color:  YES
  1027. Uses Fill Pattern:  YES
  1028.   Uses Write Mode:  NO
  1029.   Uses Font Sizes:  NO
  1030.  
  1031. This command draws an  "elliptical pie slice".  It obeys all of the same
  1032. commands as the Elliptical Arc command described above.  The ends of the
  1033. arc are connected to the Center-Point of the Arc with two straight lines.
  1034. These two lines converge at the Center-Point.  The interior of the Slice
  1035. is filled with the current Fill Color and Pattern.  The exterior
  1036. (outline) of the Slice is drawn using the current drawing color and line
  1037. thickness.  The Line Pattern feature does not apply to this command.
  1038.  
  1039.  
  1040.  
  1041. RIP_BEZIER
  1042. ----------
  1043.          Function:  Draw a bezier curve
  1044.             Level:  0
  1045.           Command:  Z
  1046.         Arguments:  x1:2 y1:2 x2:2 y2:2 x3:2 y3:2 x4:2 y4:2 cnt:2
  1047.            Format:  !|Z <x1> <y1> <x2> <y2> <x3> <y3> <x4> <y4> <cnt>
  1048.           Example:  !|Z0A0B0C0D0E0F0G0H1G
  1049.   Uses Draw Color:  YES
  1050. Uses Line Pattern:  YES
  1051.   Uses Line Thick:  YES
  1052.   Uses Fill Color:  NO
  1053. Uses Fill Pattern:  NO
  1054.   Uses Write Mode:  YES
  1055.   Uses Font Sizes:  NO
  1056.  
  1057. This command provides customizable curves.  Four control points are used
  1058. to create the shape of the curve.  The curves beginning point is at point
  1059. (x1,y1) and it ends at (x4,y4).  Points (x2,y2) and (x3,y3) are not
  1060. necessarily on the curve, but are used to pull the curve in their
  1061. direction.  The diagram below indicates how points 2 and 3 can be
  1062. utilized to form the desired curve.  Note that points 2 and 3 are not
  1063. actually on the curve, but points 1 and 4 are.
  1064.  
  1065. NOTE: Points 2 and 3 are not actually on the curve - points 1 and 4 are.
  1066.  
  1067. The last parameter of this command is the <cnt> parameter.  This
  1068. determines how many "segments" the curve should be drawn in.  Each
  1069. segment is in fact, a straight line.  The more segments you allow, the
  1070. smoother the curve may be.  If a curve does not have a significant amount
  1071. of "curviness" then a low "count" can improve performance of the curve
  1072. drawing.  Bezier Curves use "floating point" math internally for its
  1073. processing.  All parameters specified for this command are simple
  1074. integers however.
  1075.  
  1076.  
  1077.  
  1078. RIP_POLYGON
  1079. -----------
  1080.          Function:  Draw a polygon in the current color, line style, thickness
  1081.             Level:  0
  1082.           Command:  P
  1083.         Arguments:  npoints:2, x1:2, y1:2, ... xn:2, yn:2
  1084.            Format:  !|P <npoints> <x1> <y1> ... <xn> <yn>
  1085.           Example:  !|P03010105090905
  1086.   Uses Draw Color:  YES
  1087. Uses Line Pattern:  YES
  1088.   Uses Line Thick:  YES
  1089.   Uses Fill Color:  NO
  1090. Uses Fill Pattern:  NO
  1091.   Uses Write Mode:  YES
  1092.   Uses Font Sizes:  NO
  1093.  
  1094. This command will draw a multi-sided closed polygon.  The polygon is
  1095. drawn using the current drawing color, line pattern and thickness. The
  1096. <npoints> parameter is between 2 and 512 and indicates how many (x,y)
  1097. coordinate pairs will follow, which is also the number of sides of the
  1098. polygon.  The polygon interior is not filled by RIP_POLYGON.
  1099.  
  1100. The polygon is enclosed by the last vertex between xn,yn and x1,y1. In
  1101. other words, you do not have to connect the end to the beginning - it is
  1102. automatically done for you.
  1103.  
  1104.  
  1105.  
  1106. RIP_FILL_POLYGON
  1107. ----------------
  1108.          Function:  Draw a filled polygon using drawing color & fill settings
  1109.             Level:  0
  1110.           Command:  p
  1111.         Arguments:  npoints:2, x1:2, y1:2, ... xn:2, yn:2
  1112.            Format:  !|p <npoints> <x1> <y1> ... <xn> <yn>
  1113.           Example:  !|p03010105050909
  1114.   Uses Draw Color:  YES
  1115. Uses Line Pattern:  YES
  1116.   Uses Line Thick:  YES
  1117.   Uses Fill Color:  YES
  1118. Uses Fill Pattern:  YES
  1119.   Uses Write Mode:  YES
  1120.   Uses Font Sizes:  NO
  1121.  
  1122. This command is identical to RIP_POLYGON, except that the interior of the
  1123. polygon is filled with the current fill color and fill pattern. The actual
  1124. outline of the polygon is drawn using the current drawing color, line
  1125. pattern and thickness.
  1126.  
  1127. NOTE:  You will get unusual effects if the lines of the polygon overlap,
  1128.        creating a polygon with internal "gaps".  (The rule is this:
  1129.        regions that are "inside" the polygon an even number of times
  1130.        due to overlap are NOT filled.)  The interior fill does not utilize
  1131.        Write Mode, but the outline of the polygon does.
  1132.  
  1133.  
  1134.  
  1135. RIP_FILL
  1136. --------
  1137.          Function:  Flood fill screen area with the current fill settings
  1138.             Level:  0
  1139.           Command:  F
  1140.         Arguments:  x:2, y:2, border:2
  1141.            Format:  !|F <x> <y> <border>
  1142.           Example:  !|F25090F
  1143.   Uses Draw Color:  NO
  1144. Uses Line Pattern:  NO
  1145.   Uses Line Thick:  NO
  1146.   Uses Fill Color:  YES
  1147. Uses Fill Pattern:  YES
  1148.   Uses Write Mode:  NO
  1149.   Uses Font Sizes:  NO
  1150.  
  1151. This command performs a "flood fill" emanating from the given <x,y>
  1152. point.  The fill "oozes" in all directions up to <border> color, but the
  1153. border itself is not changed.  Whatever is inside the border that's not
  1154. the border color gets changed to the current fill color and fill
  1155. pattern.  If the border color does not completely enclose the <x,y>
  1156. point, the fill will continue to the edges of the viewport.
  1157.  
  1158.  
  1159.  
  1160. RIP_LINE_STYLE
  1161. --------------
  1162.          Function:  Defines a line style and thickness
  1163.             Level:  0
  1164.           Command:  =
  1165.         Arguments:  style:2, user_pat:4, thick:2
  1166.            Format:  !|= <style> <user_pat> <thick>
  1167.           Example:  !|=01000001
  1168.   Uses Draw Color:  NO
  1169. Uses Line Pattern:  YES
  1170.   Uses Line Thick:  YES
  1171.   Uses Fill Color:  NO
  1172. Uses Fill Pattern:  NO
  1173.   Uses Write Mode:  NO
  1174.   Uses Font Sizes:  NO
  1175.  
  1176. This command establishes the current line pattern and thickness for many
  1177. subsequent graphics primitive commands.  There are four built-in line
  1178. styles plus provisions for custom line patterns.
  1179.  
  1180.      Style   Description
  1181.      --------------------------------------------------------
  1182.      00      Normal, Solid Line
  1183.      01      Dotted Line
  1184.      02      Centered Line
  1185.      03      Dashed Line
  1186.      04      Custom Defined line (see about <user_pat> below)
  1187.  
  1188.      Thick   Description
  1189.      -------------------------------
  1190.      01      Lines are 1 pixel wide
  1191.      03      Lines are 3 pixels wide
  1192.  
  1193. If the <style> is set to a value of 4 (custom pattern), then the
  1194. <user_pat> parameter is used as a 16-bit representation of the pixels in
  1195. the line pattern.  For example:
  1196.  
  1197. Repeating Pattern     Binary Coding     Hex     Decimal   MegaNum
  1198. -------------------------------------------------------------------
  1199.  - - - - - - - -    1010101010101010    AAAA     43690     0XPM
  1200.  ----    ----       1111000011110000    F0F0     61680     1BLC
  1201.  
  1202. So, the most-significant-bit of <user_pat> is toward the starting point of
  1203. the line or border that uses this fill pattern.  If the <style> parameter
  1204. is not 4, then the <user_pat> parameter is ignored.
  1205.  
  1206.  
  1207.  
  1208. RIP_FILL_STYLE
  1209. --------------
  1210.          Function:  Set current fill style (predefined) and fill color
  1211.             Level:  0
  1212.           Command:  S
  1213.         Arguments:  pattern:2, color:2
  1214.            Format:  !|S <pattern> <color>
  1215.           Example:  !|S050F
  1216.   Uses Draw Color:  NO
  1217. Uses Line Pattern:  NO
  1218.   Uses Line Thick:  NO
  1219.   Uses Fill Color:  YES
  1220. Uses Fill Pattern:  YES
  1221.   Uses Write Mode:  NO
  1222.   Uses Font Sizes:  NO
  1223.  
  1224. This command defines the current fill pattern and fill color for use in
  1225. subsequent graphics fill operations.  There are twelve (12) predefined
  1226. fill patterns.  They are:
  1227.  
  1228.     Pattern  Description                 Example       Misc
  1229.     -----------------------------------------------------------------
  1230.       00     Fill with background color                (color #0)
  1231.       01     Solid Fill                                (fill color)
  1232.       02     Line Fill                   -----------   (thick lines)
  1233.       03     Light Slash Fill            /  /  /  /    (thin lines)
  1234.       04     Normal Slash Fill           // // // //   (thick lines)
  1235.       05     Normal Backslash Fill       \\ \\ \\ \\   (thick lines)
  1236.       06     Light Backslash Fill        \  \  \  \    (thin lines)
  1237.       07     Light Hatch Fill            ###########   (thin lines)
  1238.       08     Heavy Cross Hatch Fill      XXXXXXXXXXX   (thin lines)
  1239.       09     Interleaving Line Fill      +-+-+-+-+-+   (thin lines)
  1240.       0A     Widely spaced dot fill      . : . : . :   (pixels only)
  1241.       0B     Closely spaced dot fill     :::::::::::   (pixels only)
  1242.  
  1243. The <color> parameter is the fill color for subsequent fill commands. The
  1244. "active" pixels of the pattern become this color.  The "inactive" pixels
  1245. become the current background color (color 00, typically black).  Fill
  1246. pattern 00 will set the entire fill area to the background color.  (In
  1247. this special case, the fill color doesn't matter.)
  1248.  
  1249.  
  1250.  
  1251. RIP_FILL_PATTERN
  1252. ----------------
  1253.          Function:  Set user-definable (custom) fill pattern/color
  1254.             Level:  0
  1255.           Command:  s
  1256.         Arguments:  c1:2 c2:2 c3:2 c4:2 c5:2 c6:2 c7:2 c8:2 color:2
  1257.            Format:  !|s <c1> <c2> <c3> <c4> <c5> <c6> <c7> <c8> <color>
  1258.           Example:  !|s11223344556677880F
  1259.   Uses Draw Color:  NO
  1260. Uses Line Pattern:  NO
  1261.   Uses Line Thick:  NO
  1262.   Uses Fill Color:  YES
  1263. Uses Fill Pattern:  YES
  1264.   Uses Write Mode:  NO
  1265.   Uses Font Sizes:  NO
  1266.  
  1267. This command allows you to specify a user-defined, custom Fill Pattern.
  1268. This pattern supersedes the predefined patterns of RIP_FILL_STYLE.  A
  1269. custom fill pattern is an 8x8 pixel array defining which pixels should be
  1270. drawn in the current fill color (as set by the <color> parameter here).
  1271. The other pixels in the fill area are set to the current background color
  1272. (color 00, typically black).
  1273.  
  1274. Each of the eight parameters of this command, <c1> through <c8> represent
  1275. bit-patterns for a line of the 8x8 pixel array.  Each line is comprised of
  1276. 8 pixels.  The value of each parameter is the binary representation of
  1277. these 8 pixels as follows:
  1278.  
  1279.      Bit     7     6    5    4   3   2   1   0
  1280.      ----------------------------------------------
  1281.      c1     128   64   32   16   8   4   2   1
  1282.      c2     128   64   32   16   8   4   2   1
  1283.      c3     128   64   32   16   8   4   2   1
  1284.      c4     128   64   32   16   8   4   2   1
  1285.      c5     128   64   32   16   8   4   2   1
  1286.      c6     128   64   32   16   8   4   2   1
  1287.      c7     128   64   32   16   8   4   2   1
  1288.      c8     128   64   32   16   8   4   2   1
  1289.  
  1290. So, c1 is the top, and the most-significant bit is to the left.
  1291.  
  1292. NOTE:  The RIP_FILL_STYLE (predefined fill patterns) and this
  1293.        RIP_FILL_PATTERN (custom fill patterns) completely override
  1294.        each other's effects.
  1295.  
  1296.  
  1297.  
  1298. RIP_MOUSE
  1299. ---------
  1300.          Function:  Defines a rectangular hot mouse region
  1301.             Level:  1
  1302.           Command:  M
  1303.         Arguments:  num:2 x0:2 y0:2 x1:2 y1:2 clk:1 clr:1 res:5 text
  1304.            Format:  !|1M <num> <x0><y0> <x1><y1> <clk><clr><res> <text>
  1305.           Example:  !|1M00001122331100000host command^M
  1306.   Uses Draw Color:  NO
  1307. Uses Line Pattern:  NO
  1308.   Uses Line Thick:  NO
  1309.   Uses Fill Color:  NO
  1310. Uses Fill Pattern:  NO
  1311.   Uses Write Mode:  NO
  1312.   Uses Font Sizes:  NO
  1313.  
  1314. This command ties together three things:
  1315.  
  1316.      A region on the screen
  1317.      A mouse-click event
  1318.      A string of text to be transmitted by the terminal.
  1319.  
  1320. This command defines a rectangular region on the screen that functions as
  1321. a "hot" mouse area.  If the user clicks the [left] mouse button while
  1322. pointing inside the region, then the terminal must transmit the <text>
  1323. string to the Host.  The (x0,y0) parameter MUST be the upper-left corner,
  1324. and (x1,y1) MUST be the lower-right corner of the region.
  1325.  
  1326. The <clk> parameter, if 1, indicates that the region should be visibly
  1327. inverted while the mouse button is down.  This offers visual feedback. If
  1328. <clk> is 0, the region will not be inverted while clicked.
  1329.  
  1330. The <clr> parameter, if 1, will physically zoom the text window to full
  1331. screen size and clear the screen.  This is useful if the <text> parameter
  1332. instructs the host to enter an area of the System that doesn't support
  1333. RIPscrip graphics.
  1334.  
  1335. The <text> parameter is a Host command that gets sent when the field is
  1336. clicked.  You may use a caret (^) to represent control characters, (e.g.,
  1337. ^M for carriage return, ^G, ^C, etc.).
  1338.  
  1339. NOTE:  You are limited to a maximum of 128 Mouse Regions.  In addition,
  1340.        the 5-byte <res> parameter is RESERVED FOR FUTURE USE, and should
  1341.        be set to zeros (00000).
  1342.  
  1343.  
  1344.  
  1345. RIP_KILL_MOUSE_FIELDS
  1346. ---------------------
  1347.          Function:  Destroys all previously defined hot mouse regions
  1348.             Level:  1
  1349.           Command:  K
  1350.         Arguments:  <none>
  1351.            Format:  !|1K
  1352.           Example:  !|1K
  1353.   Uses Draw Color:  NO
  1354. Uses Line Pattern:  NO
  1355.   Uses Line Thick:  NO
  1356.   Uses Fill Color:  NO
  1357. Uses Fill Pattern:  NO
  1358.   Uses Write Mode:  NO
  1359.   Uses Font Sizes:  NO
  1360.  
  1361. This command will "forget" all Mouse Regions.  Use it at the beginning of
  1362. each Scene, so that one scene's Mouse Regions don't get used in another.
  1363.  
  1364.  
  1365.  
  1366. RIP_BEGIN_TEXT
  1367. --------------
  1368.          Function:  Define a rectangular text region
  1369.             Level:  1
  1370.           Command:  T
  1371.         Arguments:  x1:2, y1:2, x2:2, y2:2, res:2
  1372.            Format:  !|1T <x1> <y1> <x2> <y2> <res>
  1373.           Example:  !|1T00110011
  1374.   Uses Draw Color:  NO
  1375. Uses Line Pattern:  NO
  1376.   Uses Line Thick:  NO
  1377.   Uses Fill Color:  NO
  1378. Uses Fill Pattern:  NO
  1379.   Uses Write Mode:  NO
  1380.   Uses Font Sizes:  NO
  1381.  
  1382. This command defines a rectangular portion of the graphics viewport that
  1383. is to display text, usually a long stream of text.  Following this
  1384. command should be a number of RIP_REGION_TEXT commands with the text to
  1385. be displayed.  The RIP_END_TEXT terminates this stream of text, something
  1386. like this:
  1387.  
  1388. RIP_BEGIN_TEXT
  1389.      RIP_REGION_TEXT
  1390.      RIP_REGION_TEXT
  1391.      RIP_REGION_TEXT
  1392.      :
  1393.      RIP_REGION_TEXT
  1394. RIP_END_TEXT
  1395.  
  1396. There must be at least one RIP_REGION_TEXT command in between the header
  1397. and the footer.  There may be as many as needed.
  1398.  
  1399. These commands ignore the current font "direction"; all text is always
  1400. displayed horizontally.
  1401.  
  1402. NOTE:  The "res" parameter is two bytes wide and is RESERVED for
  1403.        future use.
  1404.  
  1405.  
  1406.  
  1407. RIP_REGION_TEXT
  1408. ---------------
  1409.          Function:  Display a line of text in the rectangular text region
  1410.             Level:  1
  1411.           Command:  t
  1412.         Arguments:  justify:1 and text-string
  1413.            Format:  !|1t <justify> <text-string>
  1414.           Example:  !|1t1This is a text line to be justified
  1415.   Uses Draw Color:  YES
  1416. Uses Line Pattern:  NO
  1417.   Uses Line Thick:  NO
  1418.   Uses Fill Color:  NO
  1419. Uses Fill Pattern:  NO
  1420.   Uses Write Mode:  YES
  1421.   Uses Font Sizes:  YES
  1422.  
  1423. A number of these commands may come sandwiched between the RIP_BEGIN_TEXT
  1424. and RIP_END_TEXT commands.  The <text-string> is already word-wrapped in
  1425. such a way that it will fit inside the rectangular region based on the
  1426. current font, font size, and drawing color.
  1427.  
  1428. There are two possible settings for the <justify> parameter:
  1429.  
  1430.   Justify   Description
  1431.   --------------------------------------------------------------------
  1432.     0       Don't right/left justify.  Left-justify only
  1433.     1       Perform right/left margin justification of this line of text
  1434.             except for the last line of a paragraph and sets of indented
  1435.             lines.
  1436.  
  1437. If a text line falls off the bottom of the region, it is discarded -- the
  1438. rectangular Text Region does not scroll.
  1439.  
  1440.  
  1441. RIP_END_TEXT
  1442. ------------
  1443.          Function:  End a rectangular text region
  1444.             Level:  1
  1445.           Command:  E
  1446.         Arguments:  <none>
  1447.            Format:  !|1E
  1448.           Example:  !|1E
  1449.   Uses Draw Color:  NO
  1450. Uses Line Pattern:  NO
  1451.   Uses Line Thick:  NO
  1452.   Uses Fill Color:  NO
  1453. Uses Fill Pattern:  NO
  1454.   Uses Write Mode:  NO
  1455.   Uses Font Sizes:  NO
  1456.  
  1457. This command indicates the end of a formatted text block.  Only one of
  1458. these "end" commands is necessary for each block.
  1459.  
  1460.  
  1461.  
  1462. RIP_GET_IMAGE
  1463. -------------
  1464.          Function:  Copy rectangular screen image to clipboard (as icon)
  1465.             Level:  1
  1466.           Command:  C
  1467.         Arguments:  x0:2, y0:2, x1:2, y1:2, res:1
  1468.            Format:  !|1C <x0> <y0> <x1> <y1> <res>
  1469.           Example:  !|1C001122330
  1470.   Uses Draw Color:  NO
  1471. Uses Line Pattern:  NO
  1472.   Uses Line Thick:  NO
  1473.   Uses Fill Color:  NO
  1474. Uses Fill Pattern:  NO
  1475.   Uses Write Mode:  NO
  1476.   Uses Font Sizes:  NO
  1477.  
  1478. This command instructs the terminal program to copy the rectangular
  1479. region defined by (x0,y0) to (x1,y1) onto an internal Clipboard for
  1480. future use.  This combined with the Paste Clipboard command can provide
  1481. an extremely powerful and efficient mechanism to avoid baud-rate
  1482. bandwidth limitations.  The (x0,y0) parameter MUST specify the upper-left
  1483. corner of the region and the (x1,y1) parameter MUST specify the
  1484. lower-right corner.  If the indicated coordinates are in anyway invalid,
  1485. the command is ignored.  The Clipboard is completely overwritten by this
  1486. command (the previous contents are lost).
  1487.  
  1488. NOTE:  The <res> parameter is RESERVED FOR FUTURE USE and
  1489.        should be set to zero.
  1490.  
  1491.  
  1492.  
  1493. RIP_PUT_IMAGE
  1494. -------------
  1495.          Function:  Pastes the clipboard (icon) contents onto the screen
  1496.             Level:  1
  1497.           Command:  P
  1498.         Arguments:  x:2, y:2, mode:2, res:1
  1499.            Format:  !|1P <x> <y> <mode> <res>
  1500.           Example:  !|1P0011010
  1501.   Uses Draw Color:  NO
  1502. Uses Line Pattern:  NO
  1503.   Uses Line Thick:  NO
  1504.   Uses Fill Color:  NO
  1505. Uses Fill Pattern:  NO
  1506.   Uses Write Mode:  NO
  1507.   Uses Font Sizes:  NO
  1508.  
  1509. This command takes the contents of the Clipboard (if any) and pastes the
  1510. image onto the screen starting at the upper-left corner of the image of
  1511. (x,y).  If the right edge of the image would go off-screen, the paste
  1512. command is ignored.  The Height and Width of the clipboard image is
  1513. recorded on the Clipboard, so this command doesn't need to supply it.
  1514.  
  1515. The <mode> parameter defines "how" the image will be pasted on the
  1516. screen:
  1517.  
  1518.   Mode   Description                                          Logical
  1519.   -------------------------------------------------------------------
  1520.    00    Paste the image on-screen normally                   (COPY)
  1521.    01    Exclusive-OR  image with the one already on screen   (XOR)
  1522.    02    Logically OR  image with the one already on screen   (OR)
  1523.    03    Logically AND image with the one already on screen   (AND)
  1524.    04    Paste the inverse of the image on the screen         (NOT)
  1525.  
  1526. NOTE:  The 1-byte <res> parameter is RESERVED FOR FUTURE USE
  1527.        and should be set to zero.
  1528.  
  1529.  
  1530.  
  1531. RIP_WRITE_ICON
  1532. --------------
  1533.          Function:  Write contents of the clipboard (icon) to disk
  1534.             Level:  1
  1535.           Command:  W
  1536.         Arguments:  res:1, filename
  1537.            Format:  !|1W <res> <filename>
  1538.           Example:  !|1W0filename.icn
  1539.   Uses Draw Color:  NO
  1540. Uses Line Pattern:  NO
  1541.   Uses Line Thick:  NO
  1542.   Uses Fill Color:  NO
  1543. Uses Fill Pattern:  NO
  1544.   Uses Write Mode:  NO
  1545.   Uses Font Sizes:  NO
  1546.  
  1547. This command takes the contents of the Clipboard and writes it to a disk
  1548. file.  This Icon file can be loaded later with a RIP_LOAD_ICON command
  1549. and stamped on the screen.
  1550.  
  1551. The command instructs the terminal to store an Icon on the terminal's
  1552. disk drive, or on some appropriate storage media.  Path or sub-directory
  1553. information is not allowed in the filename portion of the command.  If
  1554. the clipboard is nonexistent (i.e., at the beginning of a scene), this
  1555. command is ignored.  If an Icon by the same name already exists on disk,
  1556. it is overwritten.
  1557.  
  1558. NOTE:  The <res> parameter is RESERVED FOR FUTURE USE and
  1559.        should be set to zero.
  1560.  
  1561.  
  1562.  
  1563. RIP_LOAD_ICON
  1564. -------------
  1565.          Function:  Loads and displays a disk-based icon to the screen
  1566.             Level:  1
  1567.           Command:  I
  1568.         Arguments:  x:2, y:2, mode:2, clipboard:1, res:2, filename
  1569.            Format:  !|1I <x> <y> <mode> <clipboard> <res> <filename>
  1570.           Example:  !|1I001101010button.icn
  1571.   Uses Draw Color:  NO
  1572. Uses Line Pattern:  NO
  1573.   Uses Line Thick:  NO
  1574.   Uses Fill Color:  NO
  1575. Uses Fill Pattern:  NO
  1576.   Uses Write Mode:  NO
  1577.   Uses Font Sizes:  NO
  1578.  
  1579. This command instructs the terminal to read an Icon from disk and display
  1580. it at the given upper-left (x,y) location.  If the width or height of the
  1581. Icon would make it go off the right or left edge of the screen, the Icon
  1582. will not be displayed.  The <mode> parameter defines the modes in which
  1583. the Icon will be displayed on the screen.  The modes are identical to the
  1584. RIP_PUT_IMAGE command, and are as follows:
  1585.  
  1586. The .ICN file extension does not need to be included as part of the
  1587. filename.  If omitted, it will automatically be appended to the
  1588. filename.  If an extension is provided, it will be used verbatim.
  1589.  
  1590.   Mode   Description                                         Logical
  1591.   ------------------------------------------------------------------
  1592.    00    Paste the image on-screen normally                   (COPY)
  1593.    01    Exclusive-OR  image with the one already on screen   (XOR)
  1594.    02    Logically OR  image with the one already on screen   (OR)
  1595.    03    Logically AND image with the one already on screen   (AND)
  1596.    04    Paste the inverse of the image on the screen         (NOT)
  1597.  
  1598. If the <clipboard> parameter is 1, then the image pasted on screen AND
  1599. also copied onto the Clipboard.  If 0, it is simply pasted on the screen.
  1600.  
  1601. The <filename> parameter must not contain any sub-directory or path
  1602. information and must specify a valid Icon file name.  If the Icon cannot
  1603. be located or an error occurs on the disk, then a box should be displayed
  1604. on screen indicating that the given Icon File could not be loaded.  This
  1605. visual prompt indicates that something is amiss to the end-user.
  1606.  
  1607. NOTE:  The 2-byte <res> parameter is RESERVED FOR THE FUTURE
  1608.        and unlike many other previously mentioned reserved
  1609.        parameters, should be set to "10".
  1610.  
  1611.  
  1612.  
  1613. RIP_BUTTON_STYLE
  1614. ----------------
  1615.          Function:  Button style definition
  1616.             Level:  1
  1617.           Command:  B
  1618.         Arguments:  wid:2 hgt:2 orient:2 flags:4 size:2
  1619.                     dfore:2 dback:2 bright:2 dark:2 surface:2
  1620.                     grp_no:2 flags2:2 uline_col:2 corner_col:2
  1621.                     res:6
  1622.            Format:  !|1B <wid> <hgt> <orient> <flags>
  1623.                     <bevsize> <dfore> <dback> <bright> <dark>
  1624.                     <surface> <grp_no> <flags2> <uline_col>
  1625.                     <corner_col> <res>
  1626.           Example:  !|1B0A0A010274030F080F080700010E07000000
  1627.   Uses Draw Color:  NO
  1628. Uses Line Pattern:  NO
  1629.   Uses Line Thick:  NO
  1630.   Uses Fill Color:  NO
  1631. Uses Fill Pattern:  NO
  1632.   Uses Write Mode:  NO
  1633.   Uses Font Sizes:  NO
  1634.  
  1635. This RIPscrip command is probably one of the most complex in the entire
  1636. protocol.  It defines how subsequent RIP_BUTTON commands will be
  1637. interpreted.  The purpose of this command is to define what a  Button is
  1638. and how they operate.  Buttons can have many different configurations,
  1639. flags, and styles.  With the diversity of modes that the Button can take
  1640. on, complexity is a necessary evil.
  1641.  
  1642. This command does not actually do anything visibly on the screen.  Simply
  1643. put, this creates an internal definition for the Button mode which will
  1644. be used with RIP_BUTTON commands after the definition is  created.
  1645.  
  1646. Every Button can have an optional text label.  It can appear in several
  1647. different locations compared to the Button itself.  This is specified in
  1648. the <orient> parameter.  The actual text of the label is not specified
  1649. with this command, it is specified when you actually create a Button (see
  1650. RIP_BUTTON below).  The value that <orient> can be is as follows:
  1651.  
  1652.         Value   Description of Orientation
  1653.         -------------------------------------------------
  1654.          00     Display label above button
  1655.          01     Display label to the left of button
  1656.          02     Display label in the center of the button
  1657.          03     Display label to the right of button
  1658.          04     Display label beneath the button
  1659.  
  1660. The <hgt> and <wid> parameters represent the fixed height and width of
  1661. the Button (applies only to Plain Buttons).  If both values are greater
  1662. than zero, then this will represent the actual size of the Button (its
  1663. dimensions are not specified by the RIP_BUTTON command).  If both of
  1664. these are set to zero, then the actual RIP_BUTTON command will specify
  1665. the size of the particular Button (dynamic sizing).
  1666.  
  1667. The <bevsize> parameter is only used if the Bevel flag is specified.
  1668. When active, this parameter will determine how many pixels thick the
  1669. bevel should be.  This may be any value greater or equal to zero.
  1670.  
  1671. There are a large number of flag values that can be combined to achieve a
  1672. great many effects.  There are two flag parameters for the
  1673. RIP_BUTTON_STYLE command, <flags> and <flags2>.  They are detailed in the
  1674. two tables that follow in this Section.  You may combine any of the flags
  1675. in the first table together simply by adding the "Value" of each one
  1676. together and representing that number as a MegaNum.  See the Section in
  1677. this manual for a "Table of MegaNums".
  1678.  
  1679. The <dfore> and <dback> parameters are used with the text label.  The
  1680. <dfore> parameter is the foreground color for the text.  It is always used
  1681. to determine the color of the text label.  The <dback> color is the color
  1682. of the dropshadow (if any).  This parameter is only used when you have
  1683. specified the "Dropshadow" flag in the <flags> parameter (see below).
  1684.  
  1685. The <bright>, <dark> and <surface> parameters are used with Plain Buttons
  1686. and with the Special Effects styles (see <flags> below).  These colors
  1687. represent the highlighted color, the shadowed color, and the regular
  1688. surface color that is used in Special Effects.  Typical color
  1689. combinations for these colors might be White, Dark-Gray and Light-Gray
  1690. respectively for a "chiseled steel" appearance.  Each of these values can
  1691. contain a two-digit value representing any valid color code that may be
  1692. used in the RIP_COLOR command.
  1693.  
  1694. In addition to the special effects colors, are two additional colors that
  1695. can be used, <uline_color> which is used for the color of the underline
  1696. (in the text label), and <corner_color> which is used to  display the
  1697. colors of corners for things like the Bevel, Recess, etc.
  1698.  
  1699. The <grp_no> parameter determines which Button Group subsequent
  1700. RIP_BUTTON commands will be associated with.  Button Groups are used to
  1701. maintain groups of Buttons for things like Radio Buttons and/or  Checkbox
  1702. Buttons.  See the section on the BUTTON COMMAND for more information on
  1703. these modes, and what Button Groups can offer.  This value can range
  1704. anywhere from 0-Z (i.e., 0-35).  You should not mix Checkbox and Radio
  1705. buttons in the same group. -- unpredictable things may happen if you do.
  1706.  
  1707. Some <flags> are mutually exclusive.  For example, you can only have one
  1708. of the "Plain", "Icon", or "Clipboard" flags chosen at once.  To better
  1709. assist you in determining which values can be combined with  each other,
  1710. the right-most five columns in the next two tables explain if the
  1711. specific flag can be used under a specific condition.  For example, you
  1712. cannot choose the "Hot Icon" flag if you are dealing with a Clipboard
  1713. Button.  Another example is that you cannot underline the hotkey
  1714. character in the label if it is not a Mouse Button.
  1715.  
  1716. The following table contains the possible flag values for the <flags>
  1717. parameter.  Each of these values may be combined to achieve a "composite"
  1718. group of flags.  See the preceding paragraphs for a more detailed
  1719. explanation of this method.
  1720.  
  1721. Value  Description of Flags Field #1     Icon Clip  Plain Mouse No-Mouse
  1722. ------------------------------------------------------------------------
  1723.     1  Button is a "Clipboard Button"     N     Y     N     Y     Y
  1724.     2  Button is "Invertable"             Y     Y     Y     Y     N
  1725.     4  Reset screen after button click    Y     Y     Y     Y     N
  1726.     8  Display Chisel special effect      Y     Y     Y     Y     Y
  1727.    16  Display Recessed special effect    Y     Y     Y     Y     Y
  1728.    32  Dropshadow the label (if any)      Y     Y     Y     Y     Y
  1729.    64  Auto-stamp image onto Clipboard    Y     Y     Y     Y     Y
  1730.   128  Button is an "Icon Button"         Y     N     N     Y     Y
  1731.   256  Button is a "Plain Button"         N     N     Y     Y     Y
  1732.   512  Display Bevel special effect       Y     Y     Y     Y     Y
  1733.  1024  Button is a Mouse Button           Y     Y     Y     Y     N
  1734.  2048  Underline hot-key in label         Y     Y     Y     Y     N
  1735.  4096  Make Icon Button use Hot Icons     Y     N     N     Y     N
  1736.  8192  Adjust vertical centering of label Y     Y     Y     Y     Y
  1737. 16384  Button belongs to a Radio Group    Y     Y     Y     Y     N
  1738. 32768  Display Sunken special effect      Y     Y     Y     Y     Y
  1739.  
  1740. This array defines which characters have descenders (portions of their
  1741. font that go below the baseline).  This information is used in the
  1742. vertical centering of button text labels.
  1743.  
  1744. char low_char[256] =
  1745. {
  1746.     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  1747.     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  1748.     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
  1749.     0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,
  1750.     1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,
  1751.     0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
  1752.     1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
  1753.     0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0
  1754. };
  1755.  
  1756. struct METRIC
  1757. {
  1758.     unsigned char top;    // Scan lines from TOP OF CELL to top of char
  1759.     unsigned char bow;    // Scan lines from TOC to crest of char
  1760.     unsigned char base;   // Scan lines from TOC to baseline
  1761.     unsigned char drop;   // Scan lines from TOC to lowermost pixel
  1762. };
  1763.  
  1764. The METRIC structure can be described visually as follows:
  1765.  
  1766.                       0 --+----------+----------+
  1767.                           |          |          |
  1768.                      TOP__|__________|__________|
  1769.                           | #        |          |
  1770.                           | #        |          |
  1771.                           | #        |          |
  1772.                      BOW__|_#________|___   _ __|
  1773.                           | # ###    |   ### #  |
  1774.                           | ##   #   |  #   ##  |
  1775.                           | #     #  | #     #  |
  1776.                           | #     #  | #     #  |
  1777.                           | #     #  | #     #  |
  1778.                           | #     #  |  #   ##  |
  1779.                     BASE__|_#_____#__|___###_#__|
  1780.                           |          |       #  |
  1781.                           |          |       #  |
  1782.                           |          |       #  |
  1783.                           |          |  #   #   |
  1784.                     DROP__|__________|___###____|
  1785.                           |          |          |
  1786.                     END --+----------+----------+
  1787.                     
  1788. Notice that the topmost scan line of a font cell is not necessarily the
  1789. top of the character.  The top field of the structure contains the
  1790. vertical offset from the top of the cell for all fonts in that set.
  1791.  
  1792.  
  1793.     Default Font (Font 0)               Triplex Font (Font 1)
  1794.  
  1795. Size  Top    Bow   Base   Drop     Size   Top   Bow     Base   Drop
  1796. ------------------------------     --------------------------------
  1797.   1    0      2      6      7        1     6     10      18     22
  1798.   2    0      4     13     15        2     6     11      20     24
  1799.   3    0      6     20     23        3     8     13      23     28
  1800.   4    0      8     27     31        4     10    17      31     38
  1801.   5    0     10     34     39        5     13    23      41     50
  1802.   6    0     12     41     47        6     16    28      51     62
  1803.   7    0     14     48     55        7     20    34      62     76
  1804.   8    0     16     55     63        8     25    42      77     94
  1805.   9    0     18     62     71        9     30    51      93    114
  1806.  10    0     20     69     79       10     40    67     124    152
  1807.  
  1808.  
  1809.     Small Font (Font 2)                 Sans Serif Font (Font 3)
  1810.  
  1811. Size  Top    Bow   Base   Drop     Size   Top   Bow     Base   Drop
  1812. ------------------------------     --------------------------------
  1813.   1    2      3      5      6        1      7    11      19     23
  1814.   2    2      4      6      7        2      7    12      21     25
  1815.   3    2      3      6      7        3      9    14      24     29
  1816.   4    3      5      9     11        4     11    18      32     39
  1817.   5    4      7     12     14        5     14    24      42     51
  1818.   6    5      9     15     18        6     18    30      53     64
  1819.   7    6     10     13     22        7     22    36      64     78
  1820.   8    7     12     22     27        8     28    45      80     97
  1821.   9    9     15     27     33        9     33    54      96    117
  1822.  10   12     20     36     44       10     74   102     158    186
  1823.  
  1824.  
  1825.  
  1826.      Gothic Font (Font 4)                Script Font (Font 5)
  1827.  
  1828. Size  Top    Bow   Base   Drop     Size   Top   Bow     Base   Drop
  1829. ------------------------------     --------------------------------
  1830.   1    7     11     19     23        1     10    17      22     29
  1831.   2    7     12     21     25        2     10    18      24     32
  1832.   3    9     14     24     29        3     12    21      27     36
  1833.   4   11     18     32     39        4     16    28      37     49
  1834.   5   14     24     42     51        5     21    37      49     65
  1835.   6   18     30     53     64        6     26    46      61     80
  1836.   7   22     36     64     78        7     32    56      74     98
  1837.   8   28     45     80     97        8     40    70      92    122
  1838.   9   33     54     96    117        9     48    84     111    147
  1839.  10   44     72    128    156       10     63   111     147    195
  1840.  
  1841.  
  1842.  
  1843.     Simplex Font (Font 6)            Triplex Script Font (Font 7)
  1844.  
  1845. Size  Top    Bow   Base   Drop     Size   Top   Bow     Base   Drop
  1846. ------------------------------     --------------------------------
  1847.   1    9     13     21     25        1      5     9      17     21
  1848.   2    9     14     23     27        2      5    10      19     23
  1849.   3   11     16     26     31        3      7    12      22     27
  1850.   4   14     21     35     42        4      9    16      30     37
  1851.   5   18     28     46     56        5     12    22      40     49
  1852.   6   23     35     58     69        6     15    27      50     61
  1853.   7   28     42     70     84        7     19    33      61     75
  1854.   8   35     52     87    104        8     24    41      77     93
  1855.   9   42     63    105    126        9     29    50      92    113
  1856.  10   56     84    140    168       10     39    67     123    151
  1857.  
  1858.  
  1859.  
  1860.     Complex Font (Font 8)               European Font (Font 9)
  1861.  
  1862. Size  Top    Bow   Base   Drop     Size   Top   Bow     Base   Drop
  1863. ------------------------------     --------------------------------
  1864.   1    8     12     20     24        1      7    14      32     38
  1865.   2    8     13     22     26        2      7    15      35     41
  1866.   3   10     15     25     30        3      9    18      40     47
  1867.   4   13     20     34     41        4     12    24      54     64
  1868.   5   17     27     45     54        5     16    32      72     85
  1869.   6   22     34     57     68        6     20    40      96    106
  1870.   7   27     41     69     83        7     25    49     109    129
  1871.   8   34     51     86    103        8     31    61     136    161
  1872.   9   41     62    104    125        9     38    74     164    194
  1873.  10   54     83    139    167       10     51    99     219    259
  1874.  
  1875.  
  1876.  
  1877.      Bold Font (Font 10)
  1878.  
  1879. Size  Top    Bow   Base   Drop
  1880. ------------------------------
  1881.   1   11     17     35     39
  1882.   2   13     19     39     43
  1883.   3   14     22     44     49
  1884.   4   19     29     59     66
  1885.   5   27     39     79     88
  1886.   6   33     49     99    110
  1887.   7   39     59    119    133
  1888.   8   49     74    149    166
  1889.   9   59     89    179    200
  1890.  10   79    199    239    267
  1891.  
  1892. The Chisel effect draws a dropshadowed line around the inside of the
  1893. button.  How far from the borders of the button are determined by this
  1894. table:
  1895.  
  1896.         Height of Button     X inset     Y inset
  1897.         ----------------------------------------
  1898.             0 - 11              1          1
  1899.            12 - 24              3          2
  1900.            25 - 39              4          3
  1901.            40 - 74              6          5
  1902.            75 - 149             7          5
  1903.           150 - 199             8          6
  1904.           200 - 249            10          7
  1905.           250 - 299            11          8
  1906.           300 -                13          9
  1907.  
  1908. This table describes the possible flag settings for the <flags2>
  1909. parameter:
  1910.  
  1911. Value  Description of Flags Field #2         Icon Clip Plain Mouse No-Mouse
  1912. ---------------------------------------------------------------------------
  1913.   1    Button is in a check box group          Y    Y    Y     Y       N
  1914.   2    Highlight hotkey character              Y    Y    Y     Y       N
  1915.   4    Explode (zoom out when clicked)         Y    Y    Y     Y       N
  1916.   8    Left Justify Label (top/center/bottom)  Y    Y    Y     Y       Y
  1917.  16    Right Justify Label (top/center/bottom) Y    Y    Y     Y       Y
  1918.  
  1919.  
  1920.  
  1921. RIP_BUTTON
  1922. ----------
  1923.          Function:  Define a Mouse Button
  1924.             Level:  1
  1925.           Command:  U
  1926.         Arguments:  x0:2 y0:2 x1:2 y1:2 hotkey:2 flags:1 res:1
  1927.                     ...text
  1928.            Format:  !|1U <x0> <y0> <x1> <y1> <hotkey> <flags>
  1929.                     <res> <text>
  1930.           Example:  !|1U010100003200iconfile<>Label<>HostCmd^m
  1931.   Uses Draw Color:  NO
  1932. Uses Line Pattern:  NO
  1933.   Uses Line Thick:  NO
  1934.   Uses Fill Color:  NO
  1935. Uses Fill Pattern:  NO
  1936.   Uses Write Mode:  NO
  1937.   Uses Font Sizes:  YES
  1938.  
  1939. This command physically creates a new Button using the previously
  1940. described RIP_BUTTON_STYLE command.  You may have at most 128 different
  1941. Mouse Buttons (you may have any number of non-Mouse  Buttons).
  1942.  
  1943. The <x0> and <y0> parameters for this command designate the upper-left
  1944. corner of the Button.  This (X,Y) location may not be the actual
  1945. "absolute" corner position of the Button, as it may be adjusted via the
  1946. Special Effects functions that are part of the RIP_BUTTON_STYLE command
  1947. (see above).
  1948.  
  1949. The <x1> and <y1> parameters are only used for Plain Buttons when you
  1950. have not specified a specific Height and Width in the RIP_BUTTON_STYLE
  1951. command.  These parameters are used in Dynamically Sized Buttons.  If the
  1952. Height and Width in the RIP_BUTTON_STYLE are non-zero, then these two
  1953. parameters are set to zero.
  1954.  
  1955. The (x0,y0) and (x1,y1) parameters will be modified by the following
  1956. values for the different special effects:
  1957.  
  1958.   Effect Type   X0 Modifier   Y0 Modifier   X1 Modifier   Y1 Modifier
  1959.   -------------------------------------------------------------------
  1960.   Bevel         -bevel size   -bevel size   +bevel size   +bevel size
  1961.   Recess            -2            -2            +2            +2
  1962.   Sunken            0             0             0             0
  1963.   Chisel            0             0             0             0
  1964.  
  1965. The <hotkey> parameter is only used with Mouse Buttons.  It is the ASCII
  1966. code for the keystroke that will activate this Button.  It is represented
  1967. as a two-digit MegaNum.  If this character exists in the text label, and
  1968. the Underline flag is enabled in the RIP_BUTTON_STYLE, then the character
  1969. will be underlined in the label.  Control codes are allowable, and a value
  1970. of 255 (decimal) corresponds to "any" key.
  1971.  
  1972. The <flags> parameter provides several different functions for each
  1973. button.  The possible "combinatorial" flags for this parameter are listed
  1974. in the following table.  Note that these values may be combined together
  1975. (by adding their values) to arrive at the final flag parameter's value.
  1976.  
  1977.         Value  Description
  1978.         --------------------------------------------------
  1979.           1    Draw button as already selected
  1980.           2    Button is "default" when <ENTER> is pressed
  1981.  
  1982. Using a flag of 1 means that the Button is already "selected".  By
  1983. selected, we mean that it is already clicked and should be initially
  1984. drawn as clicked.  This is typically used for Radio Buttons and/or Check
  1985. Boxes.  This only affects the image.  The Host Command WILL NOT be
  1986. automatically sent to the host when a selected Button is drawn.  If this
  1987. parameter is set to 0, then the Button will be drawn in normal,
  1988. unselected mode.
  1989.  
  1990. The <text> parameter for this command is somewhat different than those
  1991. found in previously described RIPscrip commands.  All other RIPscrip
  1992. commands only have one text parameter.  This command requires  anywhere
  1993. from 0-3 text parameters.  The way RIPscrip accomplishes this is by
  1994. separating each block in the <text> parameter with the delimiter "<>".
  1995. This text parameter delimiter is not needed before the first text block,
  1996. but is necessary between the 1st and 2nd blocks, and the 2nd and 3rd
  1997. blocks.  Here is an example of a typical text parameter for this command:
  1998.  
  1999.      ICONFILE.ICN<>TEXT LABEL<>HOST COMMAND
  2000.  
  2001. The actual syntax of this text parameter is as follows:
  2002.  
  2003.      [icon-file][[<>text-label][<>host-command]]
  2004.  
  2005. The block described as ICONFILE.ICN is actually the Icon Filename that
  2006. will be used for the Button if it is an Icon Button.  If it is not an
  2007. Icon Button, then this block will read "<>" all by itself (a "null"
  2008. block).
  2009.  
  2010. The .ICN file extension does not need to be included as part of the
  2011. filename.  If omitted, it will automatically be appended to the
  2012. filename.  If an extension is provided, it will be used verbatim.
  2013.  
  2014. The "TEXT LABEL" block is actually the text that will be used to
  2015. descriptively label the Button.  You may also specify a "null" block for
  2016. no label (i.e., "<>").
  2017.  
  2018. The final block of the <text> parameter is the Host Command.  This block
  2019. contains any text that should be sent to the Host after this Button is
  2020. clicked.  This may contain any Control Characters, Pick-List definitions,
  2021. Text Variables or Template Definitions.  This block might be "segmented"
  2022. into multiple Host Command segments.  See the section entitled HOST
  2023. COMMANDS in this Manual for additional information on these Host Command
  2024. features.
  2025.  
  2026. Not all of the blocks in the <text> parameter need to be specified.  Here
  2027. are examples of the valid combinations of text blocks:
  2028.  
  2029.   Parameter Example         Description of the Text Parameter
  2030.   ---------------------------------------------------------------------
  2031.   icon<>label<>host_cmd     Specify all three blocks
  2032.     <>label<>host_cmd       2 blocks specified; no icon
  2033.       icon<>label<>         2 blocks specified; no host command
  2034.        icon<>label          2 blocks specified; no host command
  2035.       <><>host_cmd          1 block specified; no icon or label
  2036.        <>label<>            1 block specified; no icon or host command
  2037.         <>label             1 bloc specified; no icon or host command
  2038.        icon<><>             1 block specified; no label or host command
  2039.         icon<>              1 block specified; no label or host command
  2040.          icon               1 block specified; no label or host command
  2041.         <><><>              A blank text parameter; all blocks omitted
  2042.          <><>               A blank text parameter; all blocks omitted
  2043.           <>                A blank text parameter; all blocks omitted
  2044.  
  2045. NOTE:  The <res> parameter is reserved for future use by TeleGrafix
  2046.        Communications, Inc..  It should be set to 0 for compatibility
  2047.        with future releases.
  2048.  
  2049.  
  2050.  
  2051. RIP_DEFINE
  2052. ----------
  2053.          Function:  Define a text variable
  2054.             Level:  1
  2055.           Command:  D
  2056.         Arguments:  flags:3 res:2 ...text
  2057.            Format:  !|1D <flags> <res> <text>
  2058.           Example:  !|1D00700text_var,60:?question?default data
  2059.   Uses Draw Color:  NO
  2060. Uses Line Pattern:  NO
  2061.   Uses Line Thick:  NO
  2062.   Uses Fill Color:  NO
  2063. Uses Fill Pattern:  NO
  2064.   Uses Write Mode:  NO
  2065.   Uses Font Sizes:  NO
  2066.  
  2067. This command is used to create a text variable on the Client system (i.e.,
  2068. the Terminal system).  A text variable is more fully covered in the HOST
  2069. COMMANDS section.  Simply put, a text variable is a piece of information
  2070. assigned to a 1-12 character identifier that can either be saved to a
  2071. local database file (static variables), or to memory (dynamic
  2072. variables).  Variable Identifiers can be 1-12 characters in length.  You
  2073. may use any alphanumeric character and underscores (_) in the
  2074. identifier.  An underscore cannot be the first character, nor can the
  2075. first character of an identifier be a number.
  2076.  
  2077. The <flags> parameter of this command combines three separate values into
  2078. one MegaNum flag that determines how the variable definition will
  2079. operate.  Here are the possible flag values:
  2080.  
  2081.         Value     Description of Flag
  2082.         ---------------------------------------
  2083.         001     Save Variable to database
  2084.         002     Cannot specify a blank response
  2085.         004     Non-interactive query
  2086.  
  2087. When a variable is flagged as "Save to Database", it becomes a part of
  2088. the Client system's actual configuration.  The value is saved
  2089. indefinitely until either changed, or manually erased.  You may choose
  2090. not to allow the user to enter a blank response.  This basically requires
  2091. them to enter some piece of information for the variable.
  2092.  
  2093. The last flag determines whether the definition is interactive or not. An
  2094. interactive definition will attempt to define the variable.  If it does
  2095. exist, it pops the value up on the screen asking the user to confirm if
  2096. the value is correct.  If it does not exist, a similar pop-up box will
  2097. appear asking the user to enter some data for the given variable.
  2098.  
  2099. In a non-interactive situation, the Client system will check to see if
  2100. the variable exists.  If it does, then nothing happens (unless a default
  2101. response is specified in this command, whereby the Client's variable is
  2102. updated with the new information).  If the value is not defined, then
  2103. this definition becomes interactive by default, since the user actually
  2104. has to enter something anyway.
  2105.  
  2106. The <text> parameter for this command is also segmented in nature, much
  2107. like the RIP_BUTTON command is.  An example of a segmented <text>
  2108. parameter for the RIP_DEFINE command might be as follows:
  2109.  
  2110.           FULL_NAME,30:?What is your full name?John Doe
  2111.  
  2112. The actual syntax of the Variable Define text parameter is as follows:
  2113.  
  2114.   variable-identifier[,field-width]:[?question-text?][default-value]
  2115.  
  2116. There are several different segments in this parameter as you can see.
  2117. The first section is the variable- identifier.  Immediately after it is
  2118. an optional field-width.  If the field width is omitted, it will default
  2119. to a value of  60.  You should limit the values of this width from 1-60.
  2120.  
  2121. Immediately following the identifier field-width parameter is a colon (:).
  2122. The colon indicates that the variable identifier field is completed and
  2123. that the remainder of the text parameter is to contain the question
  2124. and/or the default response (if any).  If no question or default response
  2125. is provided, the text parameter would read  "TEXT_VAR,width:" with no
  2126. additional data.
  2127.  
  2128. The question-text is specified by a question mark (?) followed by the
  2129. actual text of the question, followed by a trailing question mark.  The
  2130. basic format of the question segment is as follows:
  2131.  
  2132.                     ?this is a question?
  2133.  
  2134. The remainder of the text parameter consists of a default-value for the
  2135. variable's contents.  It may be omitted if you wish, to make it so that
  2136. the user must enter his/her own value instead of some "canned response".
  2137.  
  2138. NOTE:  The <res> parameter is reserved for future use by TeleGrafix
  2139.        Communications, Inc..  It should be set to 00 for compatibility
  2140.        with future releases.
  2141.  
  2142.  
  2143.  
  2144. RIP_QUERY
  2145. ---------
  2146.          Function:  Query the contents of a text variable
  2147.             Level:  1
  2148.           Command:  <escape>
  2149.         Arguments:  mode:1 res:3 ...text
  2150.            Format:  !|1<escape> <mode> <res> <text>
  2151.           Example:  !|1<escape>0000this is a query $COMMAND$^m
  2152.   Uses Draw Color:  NO
  2153. Uses Line Pattern:  NO
  2154.   Uses Line Thick:  NO
  2155.   Uses Fill Color:  NO
  2156. Uses Fill Pattern:  NO
  2157.   Uses Write Mode:  NO
  2158.   Uses Font Sizes:  NO
  2159.  
  2160. NOTE:  <escape> is used to indicate the Escape character (ASCII 27 or ESC).
  2161.  
  2162. The Query Text Variable RIPscrip command instructs the terminal to
  2163. immediately respond with some piece of information, whether statically
  2164. stored (i.e., in a database), stored internally in RAM (dynamic
  2165. information), or pre-defined Text Variables.
  2166.  
  2167. This command is unique in RIPscrip in the fact that the command character
  2168. that is used is NOT a printable character.  We use the escape character
  2169. (ASCII 27) to introduce this command as a measure of security.  Since the
  2170. query command can query the terminal for some critical (potentially
  2171. private) information, you would not want a user to be able to query
  2172. another user's terminal for something like his address information, or
  2173. something that he wouldn't want to otherwise divulge to unauthorized
  2174. people.  Since most hosts do not allow the user to enter an escape
  2175. character, this character is ideal for this purpose.  Using escape allows
  2176. only the Host (under most circumstances) to be in control of any queries.
  2177.  
  2178. NOTE:  This command is very flexible in that you can specify control
  2179.        characters, pick-list definitions, Text Variables, and Host
  2180.        Command template definitions.  See the section entitled HOST
  2181.        COMMANDS for a more detailed explanation of these features.
  2182.  
  2183. Whether the information is transmitted instantly or not is dependent on
  2184. the <mode> parameter.  The <mode> parameter determines when data queries
  2185. are processed.  The possible settings for the <mode> parameter are as
  2186. follows:
  2187.  
  2188.  
  2189.     Mode     Description
  2190.     ----------------------------------------------------------------
  2191.      0    Process the query command NOW (upon receipt)
  2192.      1    Process when mouse clicked in Graphics Window
  2193.      2    Process when mouse clicked in Text Window (any text
  2194.           variables that return X or Y mouse coordinates return TEXT
  2195.           coordinates, not graphics coordinates in this mode.  These
  2196.           coordinates are two-digit values instead of the graphical
  2197.           values that are four digits).
  2198.  
  2199. Note that modes 1-2 do not return the results of the Query instantly.
  2200. They query commands are processed when the user clicks the mouse either
  2201. in the text window, or in the graphics window respectively. These
  2202. "queries after mouse clicks" are only acted upon if the user is clicking
  2203. on something other than a Button or a Mouse Field. To disable these two
  2204. special "deferred" query modes, issue the same command with the query
  2205. string of $OFF$.  This will disable this mode.  Providing a <text>
  2206. parameter of anything other than $OFF$ will produce a revised query
  2207. command (active).
  2208.  
  2209. Basically put, a Query command will be immediately acted upon by the
  2210. Terminal program when received.  The Query command's <text> parameter can
  2211. contain any number of Host Command "segments", which can instruct the
  2212. terminal "how to" send data to the host, and more specifically, what data
  2213. to send to the host.
  2214.  
  2215. Some examples of query statements might be any of the following:
  2216.  
  2217.                         ^m     Send a carriage return to the BBS now!
  2218.   My name is $FULL_NAME$^m     Send text "My name is <insert-name-here>"
  2219.                                followed by a  carriage return to the BBS.
  2220.                                The <insert-name-here> will be replaced
  2221.                                with whatever the variable $FULL_NAME$
  2222.                                contains.
  2223.  
  2224. See the section entitled HOST COMMANDS for a detailed explanation of Host
  2225. Commands, and what you can do with the Query command.
  2226.  
  2227. NOTE:  The <res> parameter is reserved for future use by TeleGrafix
  2228.        Communications, Inc..  It should be set to 000 for compatibility
  2229.        with future releases.
  2230.  
  2231.  
  2232.  
  2233. RIP_COPY_REGION
  2234. ---------------
  2235.          Function:  Copy screen region up/down
  2236.             Level:  1
  2237.           Command:  G
  2238.         Arguments:  x0:2 y0:2 x1:2 y1:2 res:2 dest_line:2
  2239.            Format:  !|1G <x0> <y0> <x1> <y1> <res> <dest_line>
  2240.           Example:  !|1G080G140M0005
  2241.   Uses Draw Color:  NO
  2242. Uses Line Pattern:  NO
  2243.   Uses Line Thick:  NO
  2244.   Uses Fill Color:  NO
  2245. Uses Fill Pattern:  NO
  2246.   Uses Write Mode:  NO
  2247.   Uses Font Sizes:  NO
  2248.  
  2249. This command physically "copies" a rectangular region of the graphics
  2250. screen up or down.  The <dest_line> parameter is the Y position that is
  2251. the destination scan line to receive the region. The Destination of the
  2252. copy can overlap the original region, but cannot be on the same line. You
  2253. cannot move the image area left or right at all.  This command is
  2254. designated for vertical scrolling of graphical data either up or down.
  2255.  
  2256. Due to hardware restrictions, the X0 and X1 parameters must be evenly
  2257. divisible by eight (8) (e.g., 0, 8, 16, etc.).  If the X0 and X1
  2258. parameters are NOT evenly divisible by eight, then the X0 parameter will
  2259. be reduced to the next most eight-pixel boundary, and the X1 parameter
  2260. will be increased to the next eight-pixel boundary.  For example, if
  2261. X0=14, and X1=38, then X0 would be adjusted DOWN to 8, and X1 would be
  2262. adjusted UP to 40.  This is to ensure that the desired graphical region
  2263. is scrolled.
  2264.  
  2265. The original image area is left on the screen (is not cleared).  So if you
  2266. wish to perform some kind of scrolling effect, you will have to clear the
  2267. original area yourself.
  2268.  
  2269. If the destination region would place the image partially off-screen, then
  2270. the entire command is ignored!
  2271.  
  2272. NOTE:  The <res> parameter is reserved for future development by
  2273.        TeleGrafix.
  2274.  
  2275.  
  2276.  
  2277. RIP_READ_SCENE
  2278. --------------
  2279.          Function:  Playback local .RIP file
  2280.             Level:  1
  2281.           Command:  R
  2282.         Arguments:  res:8 filename...
  2283.            Format:  !|1R <res> <filename>
  2284.           Example:  !|1R00000000testfile.rip
  2285.   Uses Draw Color:  YES
  2286. Uses Line Pattern:  YES
  2287.   Uses Line Thick:  YES
  2288.   Uses Fill Color:  YES
  2289. Uses Fill Pattern:  YES
  2290.   Uses Write Mode:  YES
  2291.   Uses Font Sizes:  YES
  2292.  
  2293. This command instructs the remote terminal to playback a local .RIP file.
  2294. The current execution of RIPscrip commands will be temporarily suspended
  2295. and the contents of the designated RIP file will begin executing.
  2296. Regardless of whether or not the current RIPscrip code coming across the
  2297. modem is in the middle of a line or not, the RIP playback file will be
  2298. assumed to start at the beginning of a line.  Therefore, if a
  2299. RIP_READ_SCENE command is located in a .RIP file, it must be the very
  2300. last command on the line, followed by a carriage return instead of a
  2301. command delimiter (|).  This ensures that the loaded .RIP file will begin
  2302. executing properly with the correct delimiters found in the correct
  2303. places.
  2304.  
  2305. The RIP playback file can alter colors, fonts, or whatever.  Once the
  2306. playback of the file is complete, the remaining RIPscrip code that was
  2307. temporarily suspended will be resume execution.  Any changes that
  2308. appeared in the loaded playback file will remain in effect when the
  2309. resumed code is processed.  In other words, if you change a color or a
  2310. font in the playback file and leave them changed, they will remain in
  2311. effect during the resumed execution.
  2312.  
  2313. NOTE:  The <res> parameter is reserved for future development by
  2314.        TeleGrafix.  It should be set to "00000000" for compatibility with
  2315.        future releases.
  2316.  
  2317.  
  2318.  
  2319. RIP_FILE_QUERY
  2320. --------------
  2321.          Function:  Query existing information on a particular file
  2322.             Level:  1
  2323.           Command:  F
  2324.         Arguments:  mode:2 res:4 filename...
  2325.            Format:  !|1F <mode> <res> <filename>
  2326.           Example:  !|1F010000testfile.icn
  2327.   Uses Draw Color:  NO
  2328. Uses Line Pattern:  NO
  2329.   Uses Line Thick:  NO
  2330.   Uses Fill Color:  NO
  2331. Uses Fill Pattern:  NO
  2332.   Uses Write Mode:  NO
  2333.   Uses Font Sizes:  NO
  2334.  
  2335. This command queries the existence of a particular file, regardless of
  2336. type.  It is intended for host systems to determine if a particular Icon
  2337. or RIP file exists on the terminal;s hard disk.
  2338.  
  2339. There are a variety of ways you can query for filenames.  The <mode>
  2340. parameter determines the command's response.  This command instructs the
  2341. terminal to send a response to the host immediately upon execution.
  2342.  
  2343. The following table is a listing of the possible values for <mode>:
  2344.  
  2345. Mode   Description
  2346. -----------------------------------------------------------------------
  2347.  00    Simply query the existence of the file.  If it exists, a "1" is
  2348.        returned.  Otherwise a "0" is returned to the Host (without a
  2349.        carriage return).
  2350.  01    Same as 0, except a carriage return is added after the response.
  2351.  02    Queries the existence of a file.  If it does not exist, a "0" is
  2352.        returned to the Host followed by a carriage return.  If it does
  2353.        exist, the returned text is a "1." followed by the file size (in
  2354.        decimal).  The return sequence is terminated by a carriage
  2355.        return.  An example of the returned text could be "1.20345".
  2356.  03    Queries extended return information.  If the file does not
  2357.        exist, a "0" is returned followed by a carriage return.  If it
  2358.        does exist, the text returned to the Host is in the Format:
  2359.        1.size.date.time <cr>.  An example of a return statement could
  2360.        be "1.20345.01/02/93.03:04:30<cr>"
  2361.  04    Queries extended return information.  If the file does not
  2362.        exist, a "0" is returned followed by a carriage return.  If it
  2363.        does exist, the text returned to the Host is in the Format:
  2364.        1.filename.size.date.time <cr>. An example of a return statement
  2365.        could be "1.MYFILE.RIP.20345.01/02/93.03:04:30 <cr>".  Note that
  2366.        the file extension adds another period into the return text.
  2367.  
  2368.  
  2369.  
  2370. RIP_ENTER_BLOCK_MODE
  2371. --------------------
  2372.          Function:  Enter block transfer mode with host
  2373.             Level:  9 (system command)
  2374.           Command:  <escape>
  2375.         Arguments:  mode:1 proto:1 file_type:2 res:4
  2376.                     [filename:2] <>
  2377.            Format:  !|9<escape> <proto> <file_type> <res>
  2378.                     [filename] <>
  2379.           Example:  !|9<escape>00010000ICONFILE.ICN<>
  2380.   Uses Draw Color:  NO
  2381. Uses Line Pattern:  NO
  2382.   Uses Line Thick:  NO
  2383.   Uses Fill Color:  NO
  2384. Uses Fill Pattern:  NO
  2385.   Uses Write Mode:  NO
  2386.   Uses Font Sizes:  NO
  2387.  
  2388. NOTE:  <escape> is used to indicate the Escape character (ASCII 27 or ESC).
  2389.  
  2390. This command is used to auto-initiate any desired File Transfer Protocol.
  2391. The <filename> parameter is optional on downloads, required for uploads,
  2392. and if omitted must be replaced with a <> parameter (end of string).
  2393.  
  2394. The <mode> parameter is to specify upload or download.  Use "1" for
  2395. upload mode, or "0" (zero) for download mode.  A filename is required for
  2396. uploads.  If the user has Data Security enabled on the terminal, they are
  2397. prompted to OK the upload before it proceeds.  If the user does not
  2398. authorize the upload, ten <Ctrl-X>'s (ASCII 24 or CAN) are sent at
  2399. one-tenth second intervals.  The <filetype> parameter is ignored for
  2400. uploads.
  2401.  
  2402. The <proto> parameter is the file transfer protocol specifier. Possible
  2403. values, and the protocols they refer to are:
  2404.  
  2405.     Value   Protocol            Filename Required?
  2406.     ----------------------------------------------
  2407.       0     Xmodem (checksum)          Yes
  2408.       1     Xmodem (CRC)               Yes
  2409.       2     Xmodem-1K                  Yes
  2410.       3     Xmodem-1K (G)              Yes
  2411.       4     Kermit                     Yes
  2412.       5     Ymodem (batch)             No
  2413.       6     Ymodem-G                   No
  2414.       7     Zmodem (crash recovery)    No
  2415.  
  2416. The <file_type> parameter determines what type of files are to be
  2417. received during the block transfer.  These are the valid parameters:
  2418.  
  2419.  
  2420.     Value   Description of Block Transfer Contents
  2421.     ---------------------------------------------------------------
  2422.       0     RIP file sequence (display it)
  2423.       1     RIP file sequence (store them)
  2424.       2     ICN file sequence (store them in proper directories)
  2425.       3     HLP file sequence (store it, and auto-load if needed)
  2426.       4     COMPOSITE DYNAMIC file sequence (batch protocols only)
  2427.       5     ACTIVE DYNAMIC file sequence (batch protocols only)
  2428.  
  2429. Whether the <filename> is specified or not, this command must have a "<>"
  2430. sequence after the filename (even if there is none).  Here are examples
  2431. of how it would look with and without a filename:
  2432.  
  2433. With a filename, using X-Modem/CRC:
  2434.  
  2435.      !|9<escape>01010000filename.icn<>
  2436.  
  2437. Without a filename, using Z-Modem
  2438.  
  2439.      !|9<escape>06040000<>
  2440.  
  2441. The special <file_type> of 4 & 5 (COMPOSITE DYNAMIC file sequences) is
  2442. somewhat different than the non-batch transfer methods.  This allows each
  2443. file uploaded to be individually processed based on their file extensions.
  2444. If you use extensions other than .RIP or .ICN, then this mode is not
  2445. available to you as the necessary files will not be able to be
  2446. processed.  Any files that are "downloaded" from the Host in DYNAMIC mode
  2447. are placed into the appropriate sub-directories and no further processing
  2448. is performed.  .RIP files that are received are "stored" and are not
  2449. played back in COMPOSITE DYNAMIC mode.  In ACTIVE DYNAMIC mode, they are
  2450. stored and played back simultaneously.
  2451.  
  2452. NOTE:  This command must be terminated with a carriage return.  A
  2453.        vertical bar (|) command delimiter cannot be used to separate
  2454.        this command from a subsequent one on the same line.  In other
  2455.        words, this command must be the last command on a line of text.
  2456.        The protocol must begin on the very next line.
  2457.  
  2458.  
  2459.  
  2460. RIP_NO_MORE
  2461. -----------
  2462.          Function:  End of RIPscrip Scene
  2463.             Level:  0
  2464.           Command:  #
  2465.         Arguments:  <none>
  2466.            Format:  !|#
  2467.           Example:  !|#
  2468.   Uses Draw Color:  NO
  2469. Uses Line Pattern:  NO
  2470.   Uses Line Thick:  NO
  2471.   Uses Fill Color:  NO
  2472. Uses Fill Pattern:  NO
  2473.   Uses Write Mode:  NO
  2474.   Uses Font Sizes:  NO
  2475.  
  2476. This command indicates that RIPscrip commands are complete.  This allows
  2477. the terminal program to activate Mouse Regions, or respond to queued up
  2478. Mouse Clicks without disturbing the natural flow of the script
  2479. transmission.
  2480.  
  2481. For noise-immunity, the Host should transmit three or more RIP_NO_MORE
  2482. command consecutively to make sure the message gets to the terminal.  The
  2483. terminal should also time-out if no data is received for a while, and
  2484. assume RIP_NO_MORE.
  2485.  
  2486.  
  2487.  
  2488.  
  2489.  
  2490. =====================================================================
  2491. ==          HOST COMMANDS - A TUTORIAL & REFERENCE SECTION         ==
  2492. =====================================================================
  2493.  
  2494. With Mouse regions, Buttons and Text Variable Query ability, you can
  2495. control the Terminal/Paint programs and how they react with the BBS
  2496. in many ways.  To accomplish this, there are several features of
  2497. RIPscrip that permit you to do special actions based on different
  2498. circumstances.  In effect, an "action language" of sorts.  The
  2499. following sections go into the available "action language" features
  2500. in more detail.
  2501.  
  2502. Among the various abilities are:
  2503.  
  2504.      1. Control-Character specification
  2505.      2. Pre-defined Text Variables & User-defined text variables
  2506.      3. Pop-up pick-lists
  2507.      4. A Host Command "Template" system for added intelligence.
  2508.      5. Query text variable contents (pre-defined & user variables)
  2509.  
  2510.  
  2511.  
  2512.  
  2513. =====================================================================
  2514. ==                        CONTROL CHARACTERS                       ==
  2515. =====================================================================
  2516.  
  2517. Not all BBS'es will allow you to use control characters on their
  2518. Service.  Regardless of that, the capability to send any Control
  2519. Character exists for your Host Commands.  The most commonly used
  2520. Control Characters are:
  2521.  
  2522.    INDIVIDUAL CONTROL CHARACTERS         SPECIAL KEYSTROKES
  2523.    ===========================================================
  2524.    ^G ... Beep                           ^[[A ... Up Arrow
  2525.    ^L ... Clear Screen (Top of Form)     ^[[B ... Down Arrow
  2526.    ^M ... Carriage Return                ^[[C ... Right Arrow
  2527.    ^C ... Break (sometimes)              ^[[D ... Left Arrow
  2528.    ^H ... Backspace                      ^[[H ... Home Key
  2529.    ^[ ... Escape character               ^[[K ... End Key
  2530.    ^S ... Pause data transmission        ^[[L ... Control Home
  2531.    ^Q ... Resume data transmission
  2532.  
  2533. Some hosts use the ^ (caret) for their own purposes.  In these
  2534. cases, you can use the ` (backquote) character instead of the
  2535. caret.  Some systems allow you to specify the caret symbol as
  2536. two carets (^^).  Consult your Host Software documentation to
  2537. determine the best method for your needs.
  2538.  
  2539. NOTE:  RIPterm uses ^ or ` and a character to represent a control
  2540.        character.  IT IS NOT A CONTROL CHARACTER BY ITSELF, IT
  2541.        IS TRANSLATED BY RIPterm.  In other words, ^M does not send
  2542.        a ^ and then an M, it sends a carriage return (ASCII 13).
  2543.        Likewise, RIPscrip commands like Query do not use an ^[, an
  2544.        actual escape character (ASCII 27) is used.
  2545.  
  2546.  
  2547.  
  2548. =====================================================================
  2549. ==                          TEXT VARIABLES                         ==
  2550. =====================================================================
  2551.  
  2552. A special feature of RIPterm allows it to understand what a Text Variable
  2553. is.  A text variable is a piece of text that both RIPaint and RIPterm
  2554. know something about.  For example, the Text Variable $DATE$ is known to
  2555. represent the current Date on your PC.  The host may ask your system what
  2556. the values of one or more of these variables are, and if your terminal
  2557. knows these particular Text Variables, it will tell the host.
  2558.  
  2559. There are three types of Text Variables.
  2560.  
  2561. -- Built-In Text Variables that RIPscrip products will ALWAYS
  2562.    know about.  These include Text Variables like date and time
  2563.    that return a value
  2564.  
  2565. -- Another type of built-in Text Variable are Active Text Variables,
  2566.    which perform an action, but return nothing to the host.  These
  2567.    include turning the status bar on/off, clearing the graphics
  2568.    screen, and playing some simple sounds.
  2569.  
  2570. -- Then there are also User Text Variables that can contain a variety
  2571.    of information depending on what the user entered at the time
  2572.    the variable was created.  For example, the host might ask you
  2573.    what the contents of the $FULL_NAME$ variable is, and if
  2574.    RIPterm doesn't know, it could pop-up a field on the screen and
  2575.    ask you about it.  From then on, RIPterm will remember that
  2576.    piece of information for the next time it is needed by a host.
  2577.  
  2578. You may use either the pre-defined Text Variables, or the User Text
  2579. Variables at any place that allows Text Variables.
  2580.  
  2581. The following is a reference of all Built-In and Active Text Variables.
  2582.  
  2583.  
  2584.  
  2585.  
  2586.  
  2587. The following is a Listing of the Pre-Defined Text Variables:
  2588. =============================================================
  2589.  
  2590.  
  2591.  
  2592.  
  2593. $RIPVER$ ... RIPscrip version (e.g., "RIPSCRIP015300")
  2594. ------------------------------------------------------
  2595. This Text Variable returns a phrase which will identify a
  2596. RIPscrip-compatible software package.  It is designed to be used by a
  2597. host to detect what version of RIPscrip graphics your terminal can
  2598. support.  When this Text Variable is used, it will respond back with
  2599. "RIPSCRIP" followed by the full Version Number (e.g., 01.53.00), without
  2600. the periods.
  2601.  
  2602.      Example:  $RIPVER$
  2603.      Returns:  RIPSCRIP015300
  2604.  
  2605.  
  2606. $DATE$ ... Date in short format
  2607. -------------------------------
  2608. This Text Variable returns the current date. in the format MM/DD/YY.
  2609.  
  2610.      Example:  $DATE$
  2611.      Returns:  12/19/93
  2612.  
  2613.  
  2614.  
  2615. $MONTH$ ... Month Name
  2616. ----------------------
  2617. This Text Variable returns the full name of the current month.  It is not
  2618. abbreviated (e.g., "November" instead of "Nov")
  2619.  
  2620.      Example:  $MONTH$
  2621.      Returns:  December
  2622.  
  2623.  
  2624.  
  2625. $MONTHNUM$ ... Month Number
  2626. ---------------------------
  2627. This Text Variable returns the number of the current month.  January=01
  2628. and December=12.
  2629.  
  2630.      Example:  $MONTHNUM$
  2631.      Returns:  12
  2632.  
  2633.  
  2634.  
  2635. $DAY$ ... Day of Month Number
  2636. -----------------------------
  2637. This Text Variable returns the current day of the month.  Possible values
  2638. for this Variable are from 01-31.
  2639.  
  2640.      Example:  $DAY$
  2641.      Returns:  05
  2642.  
  2643.  
  2644.  
  2645. $DOY$ ... Day of year
  2646. ---------------------
  2647. This Text Variable returns the number of days so far in the year.  A year
  2648. has 365 days (except leap years which have 366).  $DOY$ can return 001 -
  2649. 366.
  2650.  
  2651.      Example:  $DOY$
  2652.      Returns:  214
  2653.  
  2654.  
  2655.  
  2656. $YEAR$ ... 2 digit year
  2657. -----------------------
  2658. This Text Variable returns the two-digit number of the current year.
  2659.  
  2660.      Example:  $YEAR$
  2661.      Returns:  93
  2662.  
  2663.  
  2664.  
  2665. $FYEAR$ ... 4 digit year
  2666. ------------------------
  2667. This Text Variable returns the four-digit number of the current year.
  2668.  
  2669.      Example:  $FYEAR$
  2670.      Returns:  1993
  2671.  
  2672.  
  2673.  
  2674. $TIME$ ... Time in standard format
  2675. ----------------------------------
  2676. This Text Variable returns the time in military format (hours from 00 -
  2677. 23).  The format is hours, minutes, and seconds separated by colons.
  2678. HH:MM:SS
  2679.  
  2680.      Example:  $TIME$
  2681.      Returns:  18:09:33
  2682.  
  2683.  
  2684.  
  2685. $HOUR$ ... Hour (format HH) - normal style
  2686. ------------------------------------------
  2687. This Text Variable returns the two digit number of the current hour.
  2688. This variable range from 01 - 12.  This does not use military format.
  2689.  
  2690.      Example:  $HOUR$
  2691.      Returns:  11
  2692.  
  2693.  
  2694.  
  2695. $MHOUR$ ... Hour (format HH) - military style
  2696. ---------------------------------------------
  2697. This Text Variable returns a two-digit number of the current hour in
  2698. military format.  This variable may range from 00 - 23.
  2699.  
  2700.      Example:  $MHOUR$
  2701.      Returns:  17
  2702.  
  2703.  
  2704.  
  2705. $MIN$ ... Minutes
  2706. -----------------
  2707. This Text Variable returns the two-digit number representing the current
  2708. minutes in the hour.  Possible values for this variable are 00-59.
  2709.  
  2710.      Example:  $MIN$
  2711.      Returns:  45
  2712.  
  2713.  
  2714.  
  2715. $SEC$ ... Seconds
  2716. -----------------
  2717. This Text Variable returns a two-digit number representing the current
  2718. seconds of the minute.  Possible values for this variable are 00-59.
  2719.  
  2720.      Example:  $SEC$
  2721.      Returns:  59
  2722.  
  2723.  
  2724.  
  2725. $AMPM$ ... Returns AM or PM depending on time
  2726. ---------------------------------------------
  2727. This Text Variable returns a two-character value of either "AM" or "PM"
  2728. depending on what time it is.
  2729.  
  2730.      Example:  $AMPM$
  2731.      Returns:  PM
  2732.  
  2733.  
  2734.  
  2735. $DATETIME$ ... Date and Time
  2736. ----------------------------
  2737. This Text Variable returns a combination date and time.  The format is
  2738. somewhat different than standard time/date notation.  It is:
  2739.  
  2740.      DAY-OF-WEEK   MONTH   DAY-OF-MONTH  HH:MM:SS  YEAR
  2741.  
  2742.      Example:  $DATETIME$
  2743.      Returns:  Sat Dec 19 14:38:50 1993
  2744.  
  2745.         NOTE:  This is the standard Unix date/time notation.
  2746.  
  2747.  
  2748.  
  2749. $TIMEZONE$ ... Time Zone or "NONE" if unknown
  2750. ---------------------------------------------
  2751. This Text Variable returns a word/phrase that describes the time-zone the
  2752. terminal is in.  This may be returned as anything like "PST" for Pacific
  2753. Standard Time, "EST" for Eastern Standard Time, etc.  If the time zone is
  2754. not set on your PC, this variable will respond with "NONE".
  2755.  
  2756.      Example:  $TIMEZONE$
  2757.      Returns:  PST
  2758.  
  2759.  
  2760.  
  2761. $DOW$ ... Day of week fully spelled out
  2762. ---------------------------------------
  2763. This Text Variable returns the current day of the week.  The name is
  2764. fully spelled out.  Possible values are: Sunday, Monday, Tuesday,
  2765. Wednesday, Thursday, Friday and Saturday.
  2766.  
  2767.      Example:  $DOW$
  2768.      Returns:  Saturday
  2769.  
  2770.  
  2771.  
  2772. $ADOW$ ... Abbreviated Day of Week
  2773. ----------------------------------
  2774. This Text Variable returns the current day of the week in abbreviated
  2775. form.  Possible values are: Sun, Mon, Tue, Wed, Thu, Fri and Sat.
  2776.  
  2777.      Example:  $ADOW$
  2778.      Returns:  Mon
  2779.  
  2780.  
  2781.  
  2782. $WDAY$ ... Day of Week
  2783. ----------------------
  2784. This Text Variable returns a one-digit number representing the day of the
  2785. week.  Possible values are 0-6, where 0=Sunday (the first day in the
  2786. week).
  2787.  
  2788.      Example:  $WDAY$
  2789.      Returns:  2
  2790.  
  2791. $WOY$ ... Week of current year 00-53; Sunday=1st Day of Week
  2792. ------------------------------------------------------------
  2793. This Text Variable returns a number from 00-53, representing the week in
  2794. the year.  Even though there are 52 weeks in a year, a week might not
  2795. begin exactly on the first day of the year, so a maximum value for this
  2796. variable can be 53 under these circumstances.  For this variable, Sunday
  2797. is considered to be the first day of the week.
  2798.  
  2799.      Example:  $WOY$
  2800.      Returns:  32
  2801.  
  2802.  
  2803.  
  2804. $WOYM$ ... Week of current year 00-53; Monday=1st Day of Week
  2805. -------------------------------------------------------------
  2806. This Text Variable returns a number from 00-53, representing the week in
  2807. the current year.  Even though there are 52 weeks in a year, a week might
  2808. not begin exactly on the first day of the year, so a maximum value for
  2809. this variable can be 53 under these circumstances.  For this variable,
  2810. Monday is considered to be the first day of the week.
  2811.  
  2812.      Example:  $WOYM$
  2813.      Returns:  32
  2814.  
  2815.  
  2816.  
  2817. $BEEP$ ... Beep Sound (ala Ctrl-G)
  2818. ----------------------------------
  2819. This Active Text Variable beeps the terminal, producing a Ctrl-G sound.
  2820.  
  2821. The C source code to play this sound is:
  2822.  
  2823.           sound(1000);   // the Hertz frequency to play
  2824.           delay(75);     // millisecond delay
  2825.           nosound();     // turn the sound off
  2826.           delay(75);     // millisecond delay
  2827.  
  2828.      Example:  $BEEP$
  2829.      Returns:  nothing
  2830.  
  2831.  
  2832.  
  2833. $BLIP$ ... Blipping Sound (like a hitting a barrier)
  2834. ----------------------------------------------------
  2835. This Active Text Variable is like $BEEP$, except the sound is different.
  2836. It produces a barrier sound; like you're running into a wall.
  2837.  
  2838. The C source code to play this sound is:
  2839.  
  2840.           sound(50);     // the Hertz frequency to play
  2841.           delay(25);     // millisecond delay
  2842.           nosound();     // turn the sound off
  2843.           delay(10);
  2844.  
  2845.      Example:  $BLIP$
  2846.      Returns:  nothing
  2847.  
  2848.  
  2849.  
  2850. $MUSIC$ ... Musical (cheerful) sound
  2851. ------------------------------------
  2852. This Active Text Variable produces a cheerful sound, indicating success of
  2853. an action.  This sound is used for successful downloads and dialed
  2854. connections.
  2855.  
  2856. The C source code to play this sound is:
  2857.  
  2858.           for ( i = 0  ;  i < 4  ;  i += 1 )
  2859.           {
  2860.                sound(1300);   delay(10);     // the Hertz frequency to play
  2861.                sound(1200);   delay(10);     // millisecond delay
  2862.                sound(1100);   delay(10);
  2863.                sound(1000);   delay(10);
  2864.                sound(900);    delay(10);
  2865.                sound(800);    delay(10);
  2866.                sound(700);    delay(10);
  2867.                sound(850);    delay(10);
  2868.                sound(950);    delay(10);
  2869.           }
  2870.           nosound();                         // turn the sound off
  2871.  
  2872.      Example:  $MUSIC$
  2873.      Returns:  nothing
  2874.  
  2875.  
  2876.  
  2877. $ALARM$ ... Warning!  This sound indicates failure!
  2878. ---------------------------------------------------
  2879. This Active Text Variable produces a warning sound, indicating failure of
  2880. an action.  This sound is used for aborted downloads.
  2881.  
  2882. The C source code to play this sound is:
  2883.  
  2884.           for ( i = 0  ;  i < 3  ;  i += 1 )
  2885.           {
  2886.                sound(320);  delay(200);     // the Hertz frequency to play
  2887.                sound(160);  delay(425);     // millisecond delay
  2888.           }
  2889.           nosound();                        // turn the sound off
  2890.  
  2891.      Example:  $ALARM$
  2892.      Returns:  nothing
  2893.  
  2894.  
  2895.  
  2896. $PHASER$ ... Fire phasers!
  2897. --------------------------
  2898. This Active Text Variable produces a sound like firing your energy
  2899. weapons in a game.  Now you too blast away with the bset of them.  Trivia
  2900. question:  What is phaser stand for?  See $REVPHASERS$ for the answers.
  2901.  
  2902. The C source code to play this sound is:
  2903.  
  2904.           for ( i = 2500  ;  i >= 50  ;  i -= 20 )
  2905.           {
  2906.                sound(i);               // the Hertz frequency to play
  2907.                delay(2);               // millisecond delay
  2908.           }
  2909.           nosound();                   // turn the sound off
  2910.  
  2911.      Example:  $PHASER$
  2912.      Returns:  nothing
  2913.  
  2914.  
  2915.  
  2916. $REVPHASER$ ... Fire phasers!
  2917. -----------------------------
  2918. This Active Text Variable produces a sound like firing your energy
  2919. weapons in a game.  Like $PHASER$ makes an ascending tone, $REVPHASER$
  2920. makes a descending tone.  Answer to trivia question in $PHASER$: Phaser
  2921. stands for PHoton Amplification by Stimulated Emission of Radiation.
  2922. Sound familiar?  Laser is Light Amplification by Stimulated Emission of
  2923. Radiation, and Maser is Microwave Amplification by Stimulated Emission of
  2924. Radiation.
  2925.  
  2926. The C source code to play this sound is:
  2927.  
  2928.           for ( i = 50  ;  i <= 2500  ;  i += 20 )
  2929.           {
  2930.                sound(i);               // the Hertz frequency to play
  2931.                delay(2);               // millisecond delay
  2932.           }
  2933.           nosound();                   // turn the sound off
  2934.  
  2935.      Example:  $REVPHASER$
  2936.      Returns:  nothing
  2937.  
  2938.  
  2939.  
  2940. $X$ ... X Mouse location
  2941. ------------------------
  2942. This Text Variable returns the current X coordinate of the mouse pointer.
  2943. This can be used interactively (for example, by on-line games) to
  2944. determine the location of the mouse pointer.  Only the X value of the
  2945. mouse (X,Y) is returned.  The value is 0000-9999 depending on what the
  2946. current position is.
  2947.  
  2948.      Example:  $X$
  2949.      Returns:  0523
  2950.  
  2951.  
  2952.  
  2953. $Y$ ... Y Mouse location
  2954. ------------------------
  2955. This Text Variable returns the current Y coordinate of the mouse pointer.
  2956. This can be used interactively (for example, by on-line games) to
  2957. determine the location of the mouse pointer.  Only the Y value of the
  2958. Mouse (X,Y) is returned.  The value is 0000-9999 depending on what the
  2959. current position is.
  2960.  
  2961.      Example:  $Y$
  2962.      Returns:  0244
  2963.  
  2964.  
  2965.  
  2966. $XY$ ... X/Y Mouse Location
  2967. ---------------------------
  2968. This Text Variable returns both the X and Y coordinates of the mouse
  2969. pointer.  A colon (:) separates the two values.  The X and Y values may
  2970. range from 0000-9999.  The format that this value uses is:  XXXX:YYYY
  2971.  
  2972.      Example:  $XY$
  2973.      Returns:  0297:0321
  2974.  
  2975.  
  2976.  
  2977. $XYM$ ... X, Y & button status
  2978. ------------------------------
  2979. This Text Variable returns the X and Y coordinates of the mouse pointer,
  2980. and which mouse buttons are pressed (if any).  A colon (:) separates the
  2981. three values.  The X and Y values may range from 0000-9999.  LMR stands
  2982. for Left/Middle/Right.  If any of these buttons are depressed (clicked),
  2983. then the corresponding position will contain a 1.  If a button is NOT
  2984. depressed, then it will contain a 0.  The format that this value uses
  2985. is:  XXXX:YYYY:LMR
  2986.  
  2987. This means that the (X,Y) location of the cursor is (0123,0297), and that
  2988. the Left and Middle buttons are depressed, but that the Right Mouse
  2989. Button is not depressed.
  2990.  
  2991.      Example:  $XYM$
  2992.      Returns:  0123:0297:110
  2993.  
  2994.  
  2995.  
  2996. $M$ ... Mouse Button Status: LMR
  2997. --------------------------------
  2998. This Text Variable returns a 3-character code representing the status of
  2999. each mouse button.  This variable works with two button and three button
  3000. mice.  The format of the code is LMR where L=Left, M=Middle (if any), and
  3001. R=Right.  If any button is clicked, the code for that button is "1".  If
  3002. the button is not depressed, it is "0".  "100" would mean the left mouse
  3003. button is depressed, but none of the others are.
  3004.  
  3005.      Example:  $M$
  3006.      Returns:  001
  3007.  
  3008.  
  3009.  
  3010. $MSTAT$ ... Mouse Status
  3011. ------------------------
  3012. This Text Variable returns a "YES" if there is a mouse installed on the
  3013. RIPterm computer.  If no mouse is installed, this variable returns "NO".
  3014.  
  3015.      Example:  $MSTAT$
  3016.      Returns:  YES
  3017.  
  3018.  
  3019.  
  3020. $RESET$ ... Performs RIP_RESET_WINDOWS (Identical to !|*)
  3021. ---------------------------------------------------------
  3022. This Active Text Variable resets and clears the graphics screen, resets
  3023. the text window to full screen and clears it, resets the color palette,
  3024. deletes all mouse fields, and clears the clipboard.
  3025.  
  3026.      Example:  $RESET$
  3027.      Returns:  nothing
  3028.  
  3029.  
  3030.  
  3031. $SAVEALL$ ... Save all screen attributes
  3032. ----------------------------------------
  3033. This Active Text Variable saves the Text Windows coordinates, save the
  3034. contents of the clipboard, saves all mouse fields, and saves the contents
  3035. of the entire screen.  It is the same as doing a "$STW$ $SCB$ $SMF$
  3036. $SAVE$".
  3037.  
  3038.      Example:  $SAVEALL$
  3039.      Returns:  nothing
  3040.  
  3041.  
  3042.  
  3043. $RESTOREALL$ ... Restore all screen attributes
  3044. ----------------------------------------------
  3045. This Active Text Variable restores the Text Windows coordinates, restores
  3046. the contents of the clipboard, restores all mouse fields, and restores
  3047. the contents of the screen.  It is equal to "$RTW$ $RCB$ $RMF$
  3048. $RESTORE$".
  3049.  
  3050.      Example:  $RESTOREALL$
  3051.      Returns:  nothing
  3052.  
  3053.  
  3054.  
  3055. $EGW$ ... Erase Graphics Window
  3056. -------------------------------
  3057. This Active Text Variable erases the graphics window (much like a Reset
  3058. Windows command does). This command is useful in Host Commands.  When you
  3059. click on a Mouse Field, it could erase the graphics window THEN transmit
  3060. the remainder of the return string (if any) to the host.
  3061.  
  3062.      Example:  $EGW$
  3063.      Returns:  nothing
  3064.  
  3065.  
  3066.  
  3067. $SAVE$ and $SAVEx$ ... Save graphics screen
  3068. -------------------------------------------
  3069. The Active Text Variable $SAVE$ saves the contents of the entire graphics
  3070. screen to a disk file called RIPTERM.SAV.  No Mouse Fields, Text Window
  3071. locations or Clipboard data are saved - just the graphics screen.  The
  3072. entire 640x350 region is saved to disk.
  3073.  
  3074. If you choose the SAVE0 through SAVE9 variations, the filename that is
  3075. saved to files RIPTERM0.SAV through RIPTERM9.SAV, allowing you to have
  3076. multiple screens saved simultaneously.
  3077.  
  3078. If you wish to save the entire state of the RIPterm system, use
  3079. $SAVEALL$.
  3080.  
  3081.      Example:  $SAVE7$
  3082.      Returns:  nothing
  3083.  
  3084.  
  3085.  
  3086. $RESTORE$ and $RESTOREx$ ... Restore graphics screen
  3087. ----------------------------------------------------
  3088. The Active Text Variable $RESTORE$ reads the saved file RIPTERM.SAV in
  3089. from disk and restores the graphics as they were originally saved with
  3090. the $SAVE$ command.  Only the graphics screen is restored, not the
  3091. Clipboard, Mouse Fields or Text Window settings.
  3092.  
  3093. If you choose the RESTORE0 through RESTORE9 variations, the filename that
  3094. is restored are RIPTERM0.SAV through RIPTERM9.SAV, allowing you to
  3095. restore from up to ten different saved files.  A slight difference from
  3096. $RESTORE$ is that $RESTORE0$ - $RESTORE9$ delete the file after the
  3097. graphics screen is restored.
  3098.  
  3099. To restore the entire context of the graphics environment $RESTALL$.
  3100.  
  3101.      Example:  $RESTORE3$
  3102.      Returns:  nothing
  3103.  
  3104.  
  3105.  
  3106. $SMF$ ... Save Mouse Fields
  3107. ---------------------------
  3108. This Active Text Variable saves all defined Mouse Fields and Mouse
  3109. Buttons to a temporary file for later retrieval.  This is designed
  3110. especially for the graphical designer who wishes to pop-up a dialog box
  3111. on the screen with one or more mouse fields, and when finished, to
  3112. restore the screen and original mouse fields.  This command is intended
  3113. to be used with the Restore Mouse Fields text variable $RMF$.
  3114.  
  3115.      Example:  $SMF$
  3116.      Returns:  nothing
  3117.  
  3118.  
  3119.  
  3120. $RMF$ ... Restore Mouse Fields
  3121. ------------------------------
  3122. This Active Text Variable restores any Mouse Fields saved with $SMF$.
  3123. You may have only one set of mouse fields saved at once.  If no mouse
  3124. fields were saved, or if the number of fields saved is 0, then no mouse
  3125. fields are  active.
  3126.  
  3127. NOTE:  You may restore Mouse Fields more than once is you wish. In
  3128.        other words, if you do a $SMF$ command, you may execute
  3129.        $RMF$ one or more times.
  3130.  
  3131.      Example:  $RMF$
  3132.      Returns:  nothing
  3133.  
  3134.  
  3135.  
  3136. $MKILL$ ... Kill Mouse Fields
  3137. -----------------------------
  3138. This Active Text Variable deletes all defined Mouse Fields exactly like
  3139. RIP_KILL_MOUSE_FIELDS does.  The benefit is when the user clicks on a
  3140. Mouse Fields or Button, the Mouse Fields are removed, but the graphics
  3141. remain on the screen.  The fields could be subsequently re-defined
  3142. quickly and easily without having to re-transmit an identical menu over
  3143. again.
  3144.  
  3145.      Example:  $MKILL$
  3146.      Returns:  nothing
  3147.  
  3148.  
  3149.  
  3150. $ETW$ ... Erase Text Window
  3151. ---------------------------
  3152. This Active Text Variable erases the Text Window (like a clear screen
  3153. code does).  This command is useful in Host Commands when you click on a
  3154. Mouse Field, it could erase the text window THEN transmit the remainder
  3155. of the Host Command (if any).
  3156.  
  3157.      Example:  $ETW$
  3158.      Returns:  nothing
  3159.  
  3160.  
  3161.  
  3162. $DTW$ ... Disable Text Window
  3163. -----------------------------
  3164. This Active Text Variable disables the Text Window (preventing any
  3165. received text from showing up on screen).  This command is useful in Host
  3166. Commands when you click on a Mouse Field, it would halt any further
  3167. output to the text window.
  3168.  
  3169.      Example:  $DTW$
  3170.      Returns:  nothing
  3171.  
  3172.  
  3173.  
  3174. $STW$ ... Save Text Window information
  3175. --------------------------------------
  3176. This Active Text Variable stores all of the text window settings.  The
  3177. window's X/Y dimensions are preserved, as is the current cursor location,
  3178. ANSI attributes, cursor ON/OFF status and the vertical scrolling margins.
  3179. Even the current System Font is saved (if necessary).
  3180.  
  3181. NOTE:  The contents of the Text Window are NOT saved.
  3182.  
  3183.      Example:  $STW$
  3184.      Returns:  nothing
  3185.  
  3186.  
  3187.  
  3188. $RTW$ ... Restore Text Window information
  3189. -----------------------------------------
  3190. This Active Text Variable restores the Text Window to the settings active
  3191. when $STW$ (Save Text Window) was executed. The current cursor location,
  3192. ANSI attributes, cursor ON/OFF status, vertical scrolling margins, and
  3193. the System Font are restored.
  3194.  
  3195. NOTE:  The text contents of the window are not restored.
  3196.  
  3197.      Example:  $RTW$
  3198.      Returns:  nothing
  3199.  
  3200.  
  3201.  
  3202. $TWIN$ ... Text  Window Status
  3203. ------------------------------
  3204. This Text Variable checks to see if a Text Window exists, and returns YES
  3205. if there is a Text Window, or returns NO if there is no Text Window or
  3206. the Text Window has been disabled (with $DTW$).
  3207.  
  3208.      Example:  $TWIN$
  3209.      Returns:  YES
  3210.  
  3211.  
  3212.  
  3213. $TWFONT$ ... Active Text Font
  3214. -----------------------------
  3215. This Text Variable returns which of the five Text Window Fonts is active,
  3216. or 0 (zero) if there is no Text Window.
  3217.  
  3218.           0 ... No Text Window          3 ... 80x25 font
  3219.           1 ... 80x43 font              4 ... 91x25 MicroANSI font
  3220.           2 ... 91x43 MicroANSI font    5 ... 40x25 font
  3221.  
  3222.      Example:  $TWFONT$
  3223.      Returns:  1
  3224.  
  3225.  
  3226.  
  3227. $TWH$ ... Text Window Height
  3228. ----------------------------
  3229. This Text Variable returns the height of the Text Window, or 0 (zero) if
  3230. there is no Text Window.  If a text window exists, the minimum value is 1
  3231. and the maximum value is 43.  This may increase in the future.
  3232.  
  3233.      Example:  $TWH$
  3234.      Returns:  25
  3235.  
  3236.  
  3237.  
  3238. $TWW$ ... Text Window Width
  3239. ---------------------------
  3240. This Text Variable returns the width of the Text Window, or 0 (zero) if
  3241. there is no Text Window.  If a text window exists, the minimum value is 1
  3242. and the maximum value is 91.  This may increase in the future.
  3243.  
  3244.      Example:  $TWW$
  3245.      Returns:  80
  3246.  
  3247.  
  3248.  
  3249. $TWX0$ ... Text Window Upper Left X Coordinate
  3250. ----------------------------------------------
  3251. This Text Variable is the X coordinate of the upper left corner of the
  3252. Text Window.  The coordinates given are relative to the upper left of the
  3253. screen.  The values are given in cells, which is a block the size of one
  3254. character in the currently selected font.  A good analogy is that a cell
  3255. is equivalent to a square on a sheet of graph paper.  The cell size may
  3256. change depending on the font used, but the relative position for that
  3257. font remains constant.  If there is no Text Window, this returns 0
  3258. (zero).  However, note that 0 (zero) is also a valid coordinate.  Use
  3259. $TWIN$ to determine if there is a Text Window.
  3260.  
  3261.      Example:  $TWX0$
  3262.      Returns:  0
  3263.  
  3264.  
  3265.  
  3266. $TWY0$ ... Text Window Upper Left Y Coordinate
  3267. ----------------------------------------------
  3268. This Text Variable is the Y coordinate of the upper left corner of the
  3269. Text Window.  See $TWX0$ for an explanation of the coordinate system.
  3270.  
  3271.      Example:  $TWY0$
  3272.      Returns:  40
  3273.  
  3274.  
  3275.  
  3276. $TWX1$ ... Text Window Lower Right X Coordinate
  3277. -----------------------------------------------
  3278. This Text Variable is the X coordinate of the lower right corner of the
  3279. Text Window.  See $TWX0$ for an explanation of the coordinate system.
  3280.  
  3281.      Example:  $TWX1$
  3282.      Returns:  80
  3283.  
  3284.  
  3285.  
  3286. $TWY1$ ... Text Window Lower Right Y Coordinate
  3287. -----------------------------------------------
  3288. This Text Variable is the Y coordinate of the lower right corner of the
  3289. Text Window.  See $TWX0$ for an explanation of the coordinate system.
  3290.  
  3291.      Example:  $TWY1$
  3292.      Returns:  43
  3293.  
  3294.  
  3295.  
  3296. $CURX$ ... Text Cursor X Coordinate
  3297. -----------------------------------
  3298. This Text Variable is the X coordinate of the text cursor in the Text
  3299. Window, relative to the upper left of the Text Window.  See $TWX0$ for an
  3300. explanation of the coordinate system.
  3301.  
  3302.      Example:  $CURX$
  3303.      Returns:  2
  3304.  
  3305.  
  3306.  
  3307. $CURY$ ... Text Cursor Y Coordinate
  3308. -----------------------------------
  3309. This Text Variable is the Y coordinate of the text cursor in the Text
  3310. Window, relative to the upper left of the Text Window.  See $TWX0$ for an
  3311. explanation of the coordinate system.
  3312.  
  3313.      Example:  $CURY$
  3314.      Returns:  5
  3315.  
  3316.  
  3317.  
  3318. $CON$ ... Enable the Text Cursor
  3319. --------------------------------
  3320. This Active Text Variable turns on the text cursor.
  3321.  
  3322.      Example:  $CON$
  3323.      Returns:  nothing
  3324.  
  3325.  
  3326.  
  3327. $COFF$ ... Disable the Text Cursor
  3328. ----------------------------------
  3329. This Active Text Variable turns off the text cursor.  This is
  3330. automatically reset when a Reset Windows command is received.
  3331.  
  3332.      Example:  $COFF$
  3333.      Returns:  nothing
  3334.  
  3335.  
  3336.  
  3337. $CURSOR$ ... Text Cursor Status
  3338. -------------------------------
  3339. This Text Variable returns YES if the Text Cursor is enabled, and NO if
  3340. the Text Cursor is disabled.  If there no Text Window, it returns NO.
  3341.  
  3342.      Example:  $CURSOR$
  3343.      Returns:  YES
  3344.  
  3345.  
  3346.  
  3347. $SCB$ ... Save Clipboard
  3348. ------------------------
  3349. This Active Text Variable saves the Clipboard to disk for later retrieval
  3350. by a Query or Host Command.  If the clipboard is empty, the temporary
  3351. file is deleted so Restore Clipboard knows there shouldn't be a clipboard
  3352. active.
  3353.  
  3354.      Example:  $SCB$
  3355.      Returns:  nothing
  3356.  
  3357.  
  3358.  
  3359. $RCB$ ... Restore Clipboard
  3360. ---------------------------
  3361. This Active Text Variable restores the Clipboard from the temporary disk
  3362. file called RIPCLIB.BRD.  This file is created by $SCB$ (Save
  3363. Clipboard).  Not only are the clipboard contents saved, but so is the
  3364. last clipboard location, so Paste Clipboard ($PCB$) restores the
  3365. clipboard's contents AND location.
  3366.  
  3367.      Example:  $RCB$
  3368.      Returns:  nothing
  3369.  
  3370.  
  3371.  
  3372. $PCB$ ... Paste Clipboard at last location
  3373. ------------------------------------------
  3374. This Active Text Variable pastes the clipboard at the last location it
  3375. was clipped from. This also works with icons.  The last location taken
  3376. used is the location the icon was stamped when it was first loaded.  This
  3377. text variable is useful if you want to pop up a dialog box (saving the
  3378. previous area behind the dialog onto the clipboard), and when the user
  3379. clicks on the "OK" button, restoring the screen contents (by using a
  3380. $PCB$ in the host command string).
  3381.  
  3382.      Example:  $PCB$
  3383.      Returns:  nothing
  3384.  
  3385.  
  3386.  
  3387. $STATBAR$ ... Status Bar Status
  3388. -------------------------------
  3389. This Text Variable returns YES if the Status Bar is visible in the
  3390. terminal.  If the Status Bar is not visible, then NO is returned.
  3391.  
  3392.      Example:  $STATBAR$
  3393.      Returns:  YES
  3394.  
  3395.  
  3396.  
  3397. $SBARON$ ... Turn ON the Status Bar
  3398. -----------------------------------
  3399. This Active Text Variable turns ON the Status Bar in the terminal.
  3400.  
  3401.      Example:  $SBARON$
  3402.      Returns:  nothing
  3403.  
  3404.  
  3405.  
  3406. $SBAROFF$ ... Turn OFF the Status Bar
  3407. -------------------------------------
  3408. This Active Text Variable turns OFF the Status Bar in the terminal.
  3409.  
  3410.      Example:  $SBAROFF$
  3411.      Returns:  nothing
  3412.  
  3413.  
  3414.  
  3415. $VT102ON$ ... Turn VT-102 keyboard mode ON
  3416. ------------------------------------------
  3417. This Active Text Variable enables the VT-102 keystrokes ability.  This
  3418. makes the following keystrokes send something to the host:
  3419.  
  3420.                   F1 - ESC [ M
  3421.                   F2 - ESC [ N
  3422.                   F3 - ESC [ O
  3423.                   F4 - ESC [ P
  3424.                   F5 - ESC [ Q
  3425.                   F6 - ESC [ R
  3426.                   F7 - ESC [ S
  3427.                   F8 - ESC [ T
  3428.                   F9 - ESC [ U
  3429.                  F10 - ESC [ V
  3430.                 PGUP - ESC [ I
  3431.                 PGDN - ESC [ G
  3432.                 HOME - ESC [ H
  3433.                  END - ESC [ F
  3434.               INSERT - ESC [ L
  3435.            CURSOR UP - ESC [ A
  3436.            CURSOR DN - ESC [ B
  3437.          CURSOR LEFT - ESC [ C
  3438.         CURSOR RIGHT - ESC [ D
  3439.  
  3440. This text variable puts the terminal in VT-102 mode automatically, making
  3441. it simpler for the user.
  3442.  
  3443.      Example:  $VT102ON$
  3444.      Returns:  nothing
  3445.  
  3446.  
  3447.  
  3448. $VT102OFF$ ... Turn VT-102 keyboard mode OFF
  3449. --------------------------------------------
  3450. This Active Text Variable disables the VT-102 keystrokes mode, returning
  3451. your keyboard to the standard keyboard operation.
  3452.  
  3453.      Example:  $VT102OFF$
  3454.      Returns:  nothing
  3455.  
  3456.  
  3457.  
  3458. $DWAYON$ ... Turn Doorway Mode ON
  3459. ---------------------------------
  3460. This Active Text Variable enables Doorway Mode.  This is intended to be
  3461. used by a Host system that wishes to take advantage of the Doorway mode
  3462. available in Marshall Dudley's Doorway (tm) software package.
  3463.  
  3464.      Example:  $DWAYON$
  3465.      Returns:  nothing
  3466.  
  3467.  
  3468.  
  3469. $DWAYOFF$ ... Turn Doorway Mode OFF
  3470. -----------------------------------
  3471. This Active Text Variable disables the Doorway keyboard mode.  This will
  3472. return the keyboard to normal operation.
  3473.  
  3474.      Example:  $DWAYOFF$
  3475.      Returns:  nothing
  3476.  
  3477.  
  3478.  
  3479. $HKEYON$ ... Enable Button Hotkeys
  3480. ----------------------------------
  3481. This Active Text Variable turns on use of Button Hotkeys.  When enabled,
  3482. if the user presses a key associated with a button, it is selected just
  3483. as if it were clicked.  The Scroll Lock light on the keyboard is turned
  3484. on.
  3485.  
  3486.      Example:  $HKEYON$
  3487.      Returns:  nothing
  3488.  
  3489.  
  3490.  
  3491. $HKEYOFF$ ... Disable Button Hotkeys
  3492. ------------------------------------
  3493. This Active Text Variable turns off Button Hotkeys.  This should be done
  3494. when entering a full-screen editor, or any part of the system where the
  3495. user is entering a string of text.  This is to prevent the user from
  3496. accidentally selecting a button when typing in text.
  3497.  
  3498.      Example:  $HKEYOFF$
  3499.      Returns:  nothing
  3500.  
  3501.  
  3502.  
  3503. $TABON$ ... Enable TAB key Mouse Field select
  3504. ---------------------------------------------
  3505. This Active Text Variable turns on the use of the TAB key to jump from
  3506. one defined Mouse or Button Field to another.
  3507.  
  3508.      Example:  $TABON$
  3509.      Returns:  nothing
  3510.  
  3511.  
  3512.  
  3513. $TABOFF$ ... Disable TAB key Mouse Field select
  3514. -----------------------------------------------
  3515. This Active Text Variable turns off the use of the TAB key to jump from
  3516. one defined Mouse or Button Field to another.  If this command is
  3517. received when a field is highlighted, it is deselected.  This should be
  3518. done when entering a full-screen editor so that the user can use the TAB
  3519. key as a TAB, not a Mouse Field selector.
  3520.  
  3521.      Example:  $TABOFF$
  3522.      Returns:  nothing
  3523.  
  3524.  
  3525.  
  3526. $APP0$ - $APP9$ ... External Application Call
  3527. -----------------------------------------------
  3528. This Active Text Variable instructs the terminal to execute an external
  3529. application.  By recommendation, $APP0$ is the user's text editor.  There
  3530. are ten external application slots available, numbered 0 - 9.  These are
  3531. defined in the External menu in RIPterm.
  3532.  
  3533.      Example:  $APP1$
  3534.      Returns:  nothing
  3535.  
  3536.  
  3537.  
  3538.  
  3539. =====================================================================
  3540. ==                 LOCAL RIPscrip FILE PLAYBACK                    ==
  3541. =====================================================================
  3542.  
  3543.  
  3544. You can re-play a .RIP file that you have locally on your hard disk
  3545. from anyplace that allows text variables.  The format of the variable
  3546. is somewhat different than user variables, or pre-defined text
  3547. variables.  After the initial dollar sign ($), enter the greater-than
  3548. symbol (>) followed by the filename (with or without the .RIP
  3549. extension), then ending in another dollar sign ($).  Several examples
  3550. of this are as follows:
  3551.  
  3552.          $>MYFILE.RIP$
  3553.          $>FILE1$
  3554.          $>FILE1.RIP$$>FILE2.RIP$$>FILE3$
  3555.  
  3556. Note in the last example, a file extension other than .RIP was used.
  3557. You are not limited to playing back local .RIP files.  In fact, you
  3558. can play-back any file you want.  You could load any simple text
  3559. file, ANSI picture image, or other such thing.  When loaded, the data
  3560. is not sent to the host; it is strictly echoed on your local screen.
  3561. If the file is a .RIP file, it will replay any graphics that were in
  3562. the file and if any Mouse Regions are defined, it will create those
  3563. fields for you as well, thus allowing you to pop-up dialog screens or
  3564. other such things that are not built-in to RIPterm normally.
  3565.  
  3566. Each "local RIP playback" variable you enter will search for the .RIP
  3567. file in the current host's icon directory.  If it cannot find the
  3568. file in that directory, it will check the ICONS\ directory.
  3569.  
  3570.  
  3571.  
  3572.  
  3573.  
  3574. =====================================================================
  3575. ==                           POP-UP LISTS                          ==
  3576. =====================================================================
  3577.  
  3578. Any place that you can use a Text Variable (Queries, Button and Mouse
  3579. Field return strings, and Keystroke Macros), you can take advantage of a
  3580. unique feature of RIPscrip - Pop-Up Pick Lists.  A Pop-Up Pick List is
  3581. simply a list that pops up allowing you to choose from one of several
  3582. available values.  Whichever entry in the list you choose will insert
  3583. it's associated command in the Host Command returned back to your host.
  3584.  
  3585. A list is created by putting the special list instructions inside two sets
  3586. of parenthesis like this: (( and )).  The list consists of an optional
  3587. question followed by two colons (::), followed by one or more list
  3588. entries.  For example, ((Send Email to?::Sysop,Cosysop,Joe)) says to
  3589. pop-up a list asking you "Send Email to?", giving you the choices of
  3590. "Sysop", "Cosysop", and "Joe".
  3591.  
  3592. By default, if you press ESC instead of picking an entry in the list,
  3593. then nothing will be inserted into the text of your Command. You can
  3594. indicate that the user must pick an entry by putting an asterisk (*) at
  3595. the beginning of the question.  For example, ((*Send Mail
  3596. to?::Sysop,Joe)).  This would make it so that the user must choose either
  3597. Sysop or Joe.
  3598.  
  3599. In the previous examples, Sysop and Joe are the text responses that are
  3600. inserted into your Host Command.  These commands are also the same things
  3601. that are displayed in the listing.  If you want to use something else in
  3602. the listing instead of the return text, you can. When you make the list
  3603. entry, add an @description to the end of it.  For example:
  3604.  
  3605.      ((Send Mail To?::Sysop@Head Honcho,Cosysop,Joe))
  3606.  
  3607. ...would display a pop-up pick list of Head Honcho, Cosysop, and Joe.
  3608.  
  3609. One final feature of Pop-Up Pick Lists allows you to specify a hotkey for
  3610. each entry in the list.  For example, if you wanted the first character
  3611. of each entry to be highlighted (thus allowing you to select that
  3612. character to activate the entry), simply put a tilde (~) or an underline
  3613. (_) before and after the keystroke.  For example "_S_ysop" would
  3614. highlight the "S" in "Sysop" appearing like this:
  3615.  
  3616.                        Sysop
  3617.  
  3618. You can highlight more than one character, but only the first one will be
  3619. the active hotkey.  If you omit the second tilde or underline, then the
  3620. remainder of the description will be highlighted.
  3621.  
  3622. NOTE:  If you use a tilde or an underline in the Text Response (not the
  3623.        description), then those characters are inserted into your Host
  3624.        Command when it is transmitted to the host.  You probably
  3625.        don't want to do this.  Recommendation: only use hotkey
  3626.        features on list entries where you specify a description!
  3627.  
  3628. If you do not specify a question, then the list default to the question:
  3629.  
  3630.                Choose one of the following:
  3631.  
  3632. You may specify up to twenty entries for any one list.  In RIPterm
  3633. version 1.52 and earlier, the total length of a pick list was 256 bytes.
  3634. In version 1.53 and later, this limit has been increased to 1024 bytes.
  3635.  
  3636. Some characters have special significance in the RIPscrip language. These
  3637. characters are ! (exclamation mark, or for you Unix-heads, bang), \
  3638. (backslash), and | (vertical bar).  To use these characters in a Text
  3639. Response, they must be preceded by a backslash (! becomes \!, \ becomes
  3640. \\, and | becomes \|).  RIPaint automatically adds these when creating
  3641. Text Responses.  You need to be aware of this only if you are editing
  3642. RIPscrip files with a text editor.  The _ (underline) and ~ (tilde)
  3643. characters used to indicate the hotkey in a Text Response are not able to
  3644. be preceded by a backslash to be used by themselves.  They will be
  3645. returned to the host if they exist in a Text Response (not in the
  3646. description), however everything after the underline or tilde will be
  3647. underlined, and the first character will be considered the hotkey.
  3648.  
  3649.   Examples:
  3650.  
  3651.      ((Send E-Mail to?::Sysop,Joe,Mike))
  3652.      ((*Send E-Mail to?::Sysop@The Head Honcho,Joe,Mike@My Brother))
  3653.      ((::Sysop@_T_he Head Honcho,Joe,Mike@My _B_rother))
  3654.  
  3655.  
  3656.  
  3657.  
  3658.  
  3659. =====================================================================
  3660. ==                     HOST COMMAND "TEMPLATES"                    ==
  3661. =====================================================================
  3662.  
  3663. Often you might want a button on your screen to do one thing in one
  3664. situation, but to do something completely different in another situation.
  3665. In the past, this required having a separate menu file for each different
  3666. function that this Button needs.  This cumbersome method is history with
  3667. Command Templates.
  3668.  
  3669. Command Templates are probably best described with a brief example. Lets
  3670. say that you have a menu screen for reading and writing messages in your
  3671. public message forums.  On this menu, you can have buttons for each forum
  3672. on your host, and at the same time have buttons for Read, Write, Erase,
  3673. Modify, etc.  Now, how can you make the Read/Write/etc.  buttons work
  3674. differently for each forum button clicked?
  3675.  
  3676.                   Templates!
  3677.  
  3678. To further refine our example, lets say that you click on the button for
  3679. Forum #1, it should send the command "S FORUM1" to the host to select
  3680. that forum.  After that, simply clicking on the Read or Write buttons
  3681. will read through the current section.  But, what if you want to
  3682. interactively move about on the menu? Make each of the forum selection
  3683. buttons define a template.  Each template instructs RIPscrip how to
  3684. process the other buttons.
  3685.  
  3686. In the example above, the Forum #1 button would define this template:
  3687.  
  3688.                 S FORUM1 $?$^m
  3689.  
  3690. This template will return "S FORUM1" followed by the Host Command for
  3691. whichever button is clicked, followed by a carriage return. The special
  3692. text variable $?$ is only used in Command Templates, and is used to
  3693. indicate "insert the text into the template here".  It references the
  3694. text of some other button that was clicked that is stuffing its data INTO
  3695. this template.
  3696.  
  3697. CHARACTERISTICS OF TEMPLATES
  3698. ----------------------------
  3699. Before you can go about defining templates, you need to know how they
  3700. work, interact and how other functions interact with templates.
  3701.  
  3702. You are allowed up to 36 different templates, each of which can be
  3703. different and active at the same time.  Each template corresponds to a
  3704. Button Group (see MOUSE FIELDS AND BUTTONS for more detail).  Templates
  3705. can be defined and/or activated in any order.  In other words, you can
  3706. have a template #1, 5, 13 and 32, but none of the others defined.
  3707. Templates remain defined until re-defined by another template.
  3708.  
  3709.  
  3710. DEFINING A TEMPLATE
  3711. -------------------
  3712. To create a template, when asked for a Host Command, simply type in the
  3713. Template similar to the following:
  3714.  
  3715.      [5:]S FORUM1 $?$^m
  3716.  
  3717. The [5:] at the beginning of the command indicates that you wish to
  3718. create template #5 with the following text as the template.  Remember, a
  3719. $?$ is considered a "macro" that will insert some text into this template
  3720. from another source.  Valid template numbers are 0-9, A-Z.  So, with this
  3721. in mind, all of the following template definitions are valid:
  3722.  
  3723.      [0:]S FORUM1 $?$^m
  3724.      [9:]S FORUM2 $?$^m
  3725.      [G:]S FORUM3 $?$^m
  3726.  
  3727.  
  3728. USING TEMPLATES
  3729. ---------------
  3730. When you want to make a button "feed its command" into a template, you do
  3731. so in a format similar to defining a Template, but with a subtle
  3732. difference.  Don't include the colon (:) in the template reference.  An
  3733. example of this would be the following:
  3734.  
  3735.      [0]HELLO
  3736.  
  3737. This says, take the text "HELLO" and feed it into template number 0, and
  3738. send the final result to the host.  Note how simple it is to create and
  3739. reference templates by either using a colon or omitting it.
  3740.  
  3741. If you do not specify a Template reference in the format [#] at the
  3742. beginning of your Host Command, it will be considered to be a Normal Host
  3743. Command that does not get stuffed into any templates.  For completeness,
  3744. you may specify []HELLO to send the word "HELLO" to the host without
  3745. going through any templates (a "null" template).  So in other words,
  3746. using a [] or using nothing at all is the same thing, don't use any
  3747. templates for this host command.
  3748.  
  3749.  
  3750. CHAINING TEMPLATE RESPONSES
  3751. ---------------------------
  3752. In the preceding examples we showed how you can feed the Host Command of
  3753. one button through a single Template definition.  This is the simplest
  3754. case of template processing.  As part of the big picture of templates,
  3755. you can chain the input of one template into another template, into
  3756. another, so on and so forth and then transmit the result of all composite
  3757. template stuffing to the Host as one big command.  After all is said and
  3758. done with template processing, the text buffer sent to the host can be
  3759. anywhere from 0-4095 characters in length.
  3760.  
  3761. To chain one template into another, use a format similar to the
  3762. following:
  3763.  
  3764.      [0372]HELLO
  3765.  
  3766. This feeds the word "HELLO" into template #0, then that result into
  3767. template #3, then that result into template #7, then finally the result
  3768. will be stuffed into Template #2. The output from Template #2  will then
  3769. be transmitted to the host.
  3770.  
  3771. You may specify from 0-36 different templates in any one chaining
  3772. operations.  You MAY use the same template more than once in the same
  3773. chain, like the following:
  3774.  
  3775.      [0370]HELLO
  3776.  
  3777. Note, that template #0 is used twice, both at the beginning and the end
  3778. of the processing.  This feature, potentially dangerous, is provided for
  3779. completeness and flexibility.
  3780.  
  3781.  
  3782. EMBEDDED TEMPLATES
  3783. ------------------
  3784. You can embed the contents of one template into another template (or into
  3785. a Host Command) by using the special Text Variable $?x$ where "x" is the
  3786. Template number to insert.  This command functions much like the
  3787. insert-text variable $?$ does, but gives you a great deal more power and
  3788. flexibility.
  3789.  
  3790. If you specify to embed one template inside another, the embedded
  3791. template can contain text variables, pick-lists and other such things.
  3792. It can even have another embedded template in it as well, but that sub-
  3793. embedded template cannot have ANY text variables, or any special
  3794. commands, not even control characters!
  3795.  
  3796. To sum it up, an embedded template can have anything you want in it,
  3797. including other embedded templates.  All text variables in an embedded
  3798. template are expanded, as are pick lists, control characters and the
  3799. like.  If you have an embedded template INSIDE an embedded template, the
  3800. deepest embedded template will have NO text variable processing done on
  3801. it (i.e., the text is sent to the host verbatim, exactly as it appears in
  3802. the template).
  3803.  
  3804. If a template that is referenced is not yet defined, the template embed
  3805. command will be skipped (i.e., blank) providing that the embedded
  3806. template doesn't refer to a Radio Group. Radio Groups are "dependencies"
  3807. in this manner.  Anything that tries to embed a Template from a Radio
  3808. Group will not be processed if a template in that area hasn't been
  3809. defined yet.  Embedded templates from Check Box Groups can be skipped if
  3810. none of the check-boxes are active.
  3811.  
  3812.  
  3813. LISTS, VARIABLES AND CONTROL CHARACTERS
  3814. ---------------------------------------
  3815. You may use Text Variables, Pop-Up Pick Lists and Control Characters
  3816. anywhere in any template definition or reference.  You are limited such
  3817. that, a text variable is translated to its real value when the template
  3818. is being processed, not after all templates are processed.  The net
  3819. result of this is, you cannot use one template to construct another
  3820. template's pick- list, text variables, or the such.
  3821.  
  3822. In other words, you cannot nest Text Variable definitions, Pop-Up Pick
  3823. Lists , or Control Characters.  You can have these commands in any or all
  3824. templates used in a template chain, but they are independent.
  3825.  
  3826.  
  3827. TEMPLATE CHAIN EXAMPLES
  3828. -----------------------
  3829. Below are several examples of different template setups. These are
  3830. intended to give you ideas on how templates may be used:
  3831.  
  3832.   Example #1:
  3833.  
  3834.      [0:]D $?$ Z^m     ... Used to download a file with Zmodem
  3835.      [1:]D $?$ X^m     ... Used to download a file with Xmodem
  3836.  
  3837.      [0]FILENAME.ZIP   ... Use this with #0 to download Zmodem
  3838.      [1]FILENAME.ZIP   ... Use this with #1 to download Xmodem
  3839.  
  3840. In this example, template #0 is used for downloading with Zmodem.
  3841. Template #1 is for downloading with Xmodem.  Depending on which
  3842. FILENAME.ZIP button you click on, you might download it with one protocol
  3843. or with another.  It all lies on which template you reference.  The text
  3844. transmitted to the host if you clicked on the buttons could be either:
  3845.  
  3846.      D FILENAME.ZIP Z^m
  3847.  
  3848.           - or -
  3849.  
  3850.      D FILENAME.ZIP X^m
  3851.  
  3852.  
  3853.   Example #2:
  3854.  
  3855.      D $?2$ $?1$^m    ... Make this the "Download Now" button
  3856.  
  3857.      [1:]X            ... Radio Button #1   (X-Modem)
  3858.      [1:]Y            ... Radio Button #2   (Y-Modem)
  3859.      [1:]B            ... Radio Button #3   (Y-Modem Batch)
  3860.      [1:]Z            ... Radio Button #4   (Z-Modem)
  3861.  
  3862.      [2:]FILENUM1.ZIP ... Radio Button to download file #1
  3863.      [2:]FILENUM2.ZIP ... Radio Button to download file #2
  3864.      [2:]FILENUM3.ZIP ... Radio Button to download file #3
  3865.  
  3866. This example is a bit more involved.  It brings the concept of Radio
  3867. Buttons into the picture, which is part of the Button command. A Radio
  3868. Button is like having a list of options on your screen, only one of which
  3869. can be selected at any
  3870. one time.  When using    ╔══════════════════════════════════════════════╗
  3871. templates with Radio     ║   Protocols            Download which file?  ║
  3872. Buttons, you can quickly ║   ─────────            ────────────────────  ║
  3873. and elegantly define a   ║   X X-Modem             ■ File #1            ║
  3874. menu that can do one     ║   ■ Y-Modem             X File #2            ║
  3875. thing in one mode, or    ║   ■ Y-Modem Batch       ■ File #3            ║
  3876. something totally        ║   ■ Z-Modem                                  ║
  3877. different in another     ║ ┌──────────────────────────────────────────┐ ║
  3878. mode.  An example of     ║ │           Begin Download Now!            │ ║
  3879. the above menu might be  ║ └──────────────────────────────────────────┘ ║
  3880. as follows:              ╚══════════════════════════════════════════════╝
  3881.  
  3882. In the preceding example #2, a group of Radio Buttons were used on the
  3883. right side of the screen to determine which file should be downloaded.
  3884. In that example, there was no ability to specify an arbitrary filename to
  3885. download.  You were only allowed to download one of three given files.
  3886. What would be perfect, would be to have the ability to pop-up a question
  3887. to the user asking what filename they wanted.  The solution is easy,
  3888. insert a text-variable that hasn't been defined yet!  To illustrate, the
  3889. above example could be modified to accommodate this as follows:
  3890.  
  3891.      D $?2$ $?1$^m    ... Make this the "Download Now" button
  3892.  
  3893.      [1:]X            ... Radio Button #1   (X-Modem)
  3894.      [1:]Y            ... Radio Button #2   (Y-Modem)
  3895.      [1:]B            ... Radio Button #3   (Y-Modem Batch)
  3896.      [1:]Z            ... Radio Button #4   (Z-Modem)
  3897.  
  3898.      [2:]FILENUM1.ZIP ... Radio Button to download file #1
  3899.      [2:]FILENUM2.ZIP ... Radio Button to download file #2
  3900.      [2:]FILENUM3.ZIP ... Radio Button to download file #3
  3901.      [2:]$FILENAME$   ... Radio Button to download ANY file
  3902.  
  3903. The screen might appear something like this:
  3904.  
  3905.         ╔══════════════════════════════════════════════╗
  3906.         ║   Protocols            Download which file?  ║
  3907.         ║   ─────────            ────────────────────  ║
  3908.         ║   X X-Modem             ■ File #1            ║
  3909.         ║   ■ Y-Modem             X File #2            ║
  3910.         ║   ■ Y-Modem Batch       ■ File #3            ║
  3911.         ║   ■ Z-Modem         ┌──────────────────────┐ ║
  3912.         ║                     │    Enter Filename    │ ║
  3913.         ║                     └──────────────────────┘ ║
  3914.         ║ ┌──────────────────────────────────────────┐ ║
  3915.         ║ │           Begin Download Now!            │ ║
  3916.         ║ └──────────────────────────────────────────┘ ║
  3917.         ╚══════════════════════════════════════════════╝
  3918.  
  3919. NOTE:  To get the radio button graphic show above, an Icon Button
  3920.        must be used.  The empty circle is an icon, and the filled in
  3921.        circle is a hot icon.  Refer to Section 5.3.7.
  3922.  
  3923. Note the addition of the Enter Filename button.  If the user clicked on
  3924. that button, it would first try to replace $FILENAME$ with a text
  3925. variable.  It will find that such a variable does not exist, and will
  3926. then pop-up the following question on the screen:
  3927.  
  3928.        ╔══════════════════════════════════════════════════╗
  3929.        ║                 Enter "FILENAME"                 ║
  3930.        ║ ┌──────────────────────────────────────────────┐ ║
  3931.        ║ │ █                                            │ ║
  3932.        ║ └──────────────────────────────────────────────┘ ║
  3933.        ╚══════════════════════════════════════════════════╝
  3934.  
  3935. If the user typed in DEMOFILE.TXT, then that filename is inserted where
  3936. $FILENAME$ was, resulting in (for example):
  3937.  
  3938.      D DEMOFILE.TXT Z^m
  3939.  
  3940. This is only an example, your mileage may vary.
  3941.  
  3942.  
  3943. MORE ABOUT TEMPLATES
  3944. --------------------
  3945. When you use the $?$ text variable inside a template definition, you are
  3946. not limited to using it only once.  In fact, you can use it as many times
  3947. in your template definition as you wish.  This can be useful under many
  3948. circumstances where the user might have to enter the same thing twice.
  3949.  
  3950.  
  3951.  
  3952.  
  3953.  
  3954. =====================================================================
  3955. ==                TEXT VARIABLE CREATION, AND QUERY                ==
  3956. =====================================================================
  3957.  
  3958. As mentioned in preceding sections, Text Variables were described as
  3959. either pre-defined variables, or as User Variables.  Pre-defined
  3960. variables are variables that RIPscrip products know things about "out of
  3961. the box".  They will always know what the variables mean, from the day
  3962. you install the software.  User Variables are variables that the user of
  3963. RIPscrip products defines, and teach it new things it doesn't already
  3964. know.
  3965.  
  3966.  
  3967. WHAT ARE USER VARIABLES?
  3968. ------------------------
  3969. A User Variable is a Text Variable that RIPscrip doesn't know exists.
  3970. They are custom-defined text variables that contain information that the
  3971. terminal user will fill in.  If a variable already contains information,
  3972. a host will be automatically told (if told to do so) what that variable
  3973. contains without the user having to intervene (i.e., transparent
  3974. information exchange).
  3975.  
  3976. Examples of Text Variables might be:
  3977.  
  3978.      $FULL_NAME$    ... What is your full name?
  3979.      $COMPANY_NAME$ ... What company do you work for?
  3980.      $AGE$          ... How old are you?
  3981.      $DATEOFBIRTH$  ... What is your Date of Birth?
  3982.      $PHONENUMBER$  ... What is your Day-time phone number?
  3983.  
  3984. User Variables will "keep track" of these responses for you, in the
  3985. terminal program database.  You can tell the terminal to store these
  3986. values permanently, or they may be active only during the current
  3987. session, or they may be defined as temporary where they are not stored
  3988. for more than a brief moment.
  3989.  
  3990. NOTE:  This ability is configurable so that information exchange can
  3991.        be either interactive, or automatic.  Automatic transfer of
  3992.        information does NOT prompt the user with the information
  3993.        unless the variable has not yet been defined.  If it has not
  3994.        been defined, a pop-up question will appear asking the user
  3995.        a particular question, thus defining the text variable.
  3996.  
  3997. If the exchange is interactive, the data is displayed in a pop-up editor
  3998. box, asking you if the information is correct.  If it is, press ENTER and
  3999. the retrieved information is sent to the host for you.  If it is not
  4000. correct, or it has not been created yet, just type it in and press ENTER
  4001. and it will be saved automatically, and sent to the host all at once.
  4002.  
  4003.  
  4004. HOW CAN USER VARIABLES BE IMPORTANT?
  4005. ------------------------------------
  4006. Lets take an example.  You are the system operator of a large RIPscrip
  4007. host.  As you have read, RIPscrip can take advantage of database-like
  4008. ability on the terminal end.  If you can alter your host to ask questions
  4009. with RIPscrip Text Variables built in, you can have the terminal calling
  4010. your host automatically fill in questionnaires.  Imagine if a user could
  4011. sign-up on your host without having to type more than a single keystroke
  4012. (i.e., "YES, this information is correct").  With User Text Variables,
  4013. you can do this very thing.
  4014.  
  4015.  
  4016. CREATING USER VARIABLES
  4017. -----------------------
  4018. There are two ways of defining User Text Variables in RIPaint.  You can
  4019. use either the Define Text Variable command, or you can use Text Variable
  4020. Queries, as described in the next section.
  4021.  
  4022.  
  4023. DEFINING TEXT VARIABLES
  4024. -----------------------
  4025. The RIPscrip command Define Text Variable is by definition, an
  4026. interactive command with the user.  The RIPscrip command will attempt to
  4027. define a User Variable.  This variable is some piece of information that
  4028. the system operator deems important.  You may specify a question, a
  4029. default response, and how many characters long the response may be.
  4030.  
  4031. Once the terminal has received a define command, the terminal pops up an
  4032. appropriate question box on the user's screen, asking him the desired
  4033. question that should be saved to a particular Text Variable.  If you did
  4034. not specify a question, a default question is used (i.e., "Enter <name of
  4035. text variable>").
  4036.  
  4037. Once the user has entered his response, it is recorded and saved.  How
  4038. long it is stored depends on what the host told the terminal.  The host
  4039. can tell the terminal "save this on your hard disk forever".  The host
  4040. may also tell the terminal "don't save this to disk, but remember this
  4041. value until you exit RIPterm".  You also have the option of saying "don't
  4042. remember this value at all, just pop up a question, and send the value to
  4043. me NOW" - i.e., don't save it at all, just enter it and send it to the
  4044. host).
  4045.  
  4046.  
  4047. QUERYING TEXT VARIABLES
  4048. -----------------------
  4049. Now that you know how to define information on the terminal, you need to
  4050. know the last method of asking the terminal about text variables.  This
  4051. feature is called "Data Query".
  4052.  
  4053. Data Query is a generic query command that can ask the terminal one or
  4054. more questions, and tell it how to transmit the information back to the
  4055. host.  This command is for use in non-button situations where you do not
  4056. want to wait until the user clicks on a button to get your data back.
  4057.  
  4058. Data Query is a special RIPscrip command that can be used to ask the
  4059. contents of one or more Text Variables.
  4060.  
  4061.  
  4062. EXAMPLES OF TEXT VARIABLE QUERY
  4063. -------------------------------
  4064. Lets take a simple example.  You wanted to ask the terminal program some
  4065. address information.  You could do this with the following query
  4066. (remember, the query also tells the terminal HOW to send the data back to
  4067. the host):
  4068.  
  4069.      $FULL_NAME$^m$COMPANY$^m$ST_ADDR$^m$CITY$, $STATE$ $ZIP^m
  4070.  
  4071. This would query the terminal the contents of 6 text variables, and
  4072. format them in a manner similar to any normal address on an envelope.
  4073. The results of this query might send the following back to the host :
  4074.  
  4075.      Joe Sixpack
  4076.      ACME Corporation
  4077.      13631 Palindrome Parkway
  4078.      Surf City, CA 92649
  4079.  
  4080. If a text variable is queried, and it has not been defined yet, a pop-up
  4081. question will appear asking the user to fill in the information.
  4082.  
  4083.  
  4084.  
  4085.