home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / comm / term23_1.lha / termRexx.doc < prev    next >
Text File  |  1992-08-23  |  18KB  |  609 lines

  1. Copyright (C) 1990-1992 Olaf Barthel und MXM
  2.  
  3.  
  4.  
  5. term and ARexx
  6. ****************
  7.  
  8.    This document describes the ARexx commands supported by `term'. This
  9. is not intended to be an introduction to the language itself. Rexx was
  10. developed by Mike F.  Cowlishaw on an IBM/SP system and ported to the
  11. Amiga by William S.  Hawes.
  12.  
  13.    ARexx (or Amiga Rexx) is a commercial product which is included with
  14. the AmigaDOS 2.0 Enhancer Package.  If you need a good introduction and
  15. description of the language, try to get a hold of the book `The REXX
  16. Language A Practical Approach to Programming' by M.F. Cowlishaw,
  17. available from Prentice-Hall International, Inc.
  18.  
  19.    `term' opens an ARexx host by the name of `TERM' (accessable via
  20. `address term').  If more than a single `term' process is running on
  21. your machine, the name of the host will be adapted to the number of the
  22. program (i.e.  the first programm will use `TERM', the second one will
  23. use `TERM.1', the third one `TERM.2', etc.).  The name of the host is
  24. also displayed in the title bar of the `term' main screen.
  25.  
  26.    Currently, 47 commands are implemented, which can be divided into
  27. two classes:
  28.  
  29.    * Asynchronous commands, which will be executed at once and do not
  30.      force the executing program to wait.
  31.  
  32.    * Synchronous commands, that are executed by `term' itself. This
  33.      might make it neccessary for the ARexx-program to wait for the
  34.      completion of the command.
  35.  
  36.  
  37. Asynchronous commands
  38. **********************
  39.  
  40. `CLEARDISPLAY'
  41.      Deletes the contents of the logbook.
  42.  
  43. `CLOSEDISPLAY'
  44.      Closes the logbook window, but keeps the contents.
  45.  
  46. `DEFAULT2FRONT'
  47.      Brings the default screen to the front.  This is usually the
  48.      workbench screen.
  49.  
  50. `REXX2FRONT'
  51.      Pops the screen that contains the ARexx-output window to the front.
  52.  
  53. `DISPLAY2FRONT'
  54.      Pops the text buffer screen to the front.
  55.  
  56. `TERM2FRONT'
  57.      Brings the main term program screen to the front.
  58.  
  59. `WB2FRONT'
  60.      Brings the Workbench screen to the front.
  61.  
  62. `CLEARDOWNLOADLIST'
  63.      The list of received files is deleted.
  64.  
  65. `QUERY'
  66.      Ask for several system parameters.  As this command is rather
  67.      complex, it will be described later.
  68.  
  69. `QUIETEXIT'
  70.      The output window is closed right away after completion.  Usually,
  71.      it waits for the user to confirm the action.
  72.  
  73.  
  74. Synchronous commands
  75. *********************
  76.  
  77. `BDOWNLOAD'
  78.      Starts a download of a binary file.  A filename is expected, but
  79.      not needed for protocols like ZModem.
  80.  
  81. `BEEP'
  82.      Displays a `beep' signal, like a sound or screen flash.
  83.  
  84. `BREAK'
  85.      Sends a break signal over to the modem.
  86.  
  87. `BUFFER'
  88.      Initiates different logbook actions.  `buffer new file' uses
  89.      `file' for logging.  An existing `file' is replaced. `set buffer
  90.      append file' appends all following logbook actions to the `file'. 
  91.      `buffer display' will display the current text buffer.
  92.  
  93. `BUPLOAD'
  94.      Starts a binary upload.  A filename has to be supplied, otherwise
  95.      the transfer protocol will complain.  Only a single filename may be
  96.      given, for multiple uploads check the wildcard-options.
  97.  
  98. `CAPTURE'
  99.      Changes the capture options.  `capture close' closes the current
  100.      capture file.  `capture new file' replaces the `file' with the new
  101.      capture.  `capture append file' appends the new capture to the
  102.      `file'.
  103.  
  104. `CLEARSCREEN'
  105.      Clears the screen.
  106.  
  107. `COMMAND'
  108.      Sends a command sequence over the serial line.
  109.  
  110. `CONFIG'
  111.      Saves or restores the configuration (`config save file' to save as
  112.      `file', `config load file' to load `file').
  113.  
  114. `DELAY'
  115.      Suspends script execution for a certain time.  There is now way to
  116.      stop this command, so you shouldn't use to long delays.  The delay
  117.      may be given in microseconds, seconds or minutes:
  118.  
  119.     `delay 10 mic'
  120.           Waits ten microseconds
  121.  
  122.     `delay 10 sec'
  123.           Waits ten seconds
  124.  
  125.     `delay 10 min'
  126.           Waits ten minutes
  127.  
  128. `DIAL'
  129.      Dials a number.  You may also use a name from the phonebook.  If a
  130.      matching entry is found, its number is dialed.  Please note:  This
  131.      command only sends the dial command to the modem.  Handling of the
  132.      result has to be done seperately!
  133.  
  134. `FILEREQUEST'
  135.      Displays a file requester asking the user to select a file.  The
  136.      text passed to this routine will be displayed in the title bar of
  137.      the file requester window.
  138.  
  139. `FIRSTDOWNLOAD'
  140.      The names of all files downloaded during a batch download is kept
  141.      in a list that can be accessed via ARexx.  This command returns the
  142.      name of the first file in the list.
  143.  
  144. `GETCLIP'
  145.      Gets the contents of the clipboard and returns it as a string.
  146.  
  147. `GETSTRING'
  148.      Queries a string from the user.
  149.  
  150. `HANGUP'
  151.      Closes the current connection (if exists) by sending the
  152.      hangup-command to the modem.
  153.  
  154. `INPUT'
  155.      Reads a certain number of chars (given when calling the function)
  156.      from the port.  If the `set timeout' command has been used, this
  157.      function will return either after receiving enough chars, or when
  158.      the timeout is reached.
  159.  
  160. `LASTDOWNLOAD'
  161.      The names of all files downloaded during a batch download is kept
  162.      in a list that can be accessed via ARexx.  This command returns the
  163.      name of the last file in the list.
  164.  
  165. `MACROS'
  166.      Either saves or loads the current function key bindings (`macros
  167.      save file' or `macros load file').
  168.  
  169. `MESSAGE'
  170.      Displays a text.  This text is not sent over the serial line!
  171.  
  172. `NEXTDOWNLOAD'
  173.      The names of all files downloaded during a batch download is kept
  174.      in a list that can be accessed via ARexx.  This command returns the
  175.      name of the next file in the list.  Before using this command,
  176.      either `firstdownload' or `lastdownload' must have been called!
  177.  
  178. `PHONE'
  179.      Saves or loads the current phonebook (`phone save file' or `phone
  180.      load file').
  181.  
  182. `PRINTER'
  183.      Turns the logfile-printing on (`printer on') or off (`printer
  184.      off').
  185.  
  186. `PUTCLIP'
  187.      Stores a string in the clipboard.
  188.  
  189. `RESETSTYLES'
  190.      Restores the terminal emulation to standard, turning all special
  191.      attributes off.
  192.  
  193. `SAVEILBM'
  194.      Saves the current screen as an IFF-ILBM-file (filename to be given
  195.      by the script).
  196.  
  197. `SET'
  198.      Sets system parameters.  Please check a couple lines down for more
  199.      information.
  200.  
  201. `SIMPLEREQUEST'
  202.      Displays a simple information requester, such as the one used by
  203.      `term' when it fails to open the serial driver.
  204.  
  205. `SPEAK'
  206.      Speaks a text using the `term' speech synthesizer.  Note that this
  207.      feature requires the synthesizer to be enabled.
  208.  
  209. `SPEECH'
  210.      Either saves or loads the current speech synthesizer settings
  211.      (`speech save file' or `speech load file').
  212.  
  213. `TERMEXIT'
  214.      Terminates the program, just as if one had selected the `Quit' menu
  215.      item in the main menu.
  216.  
  217. `TDOWNLOAD'
  218.      Starts a download (as with `BDOWNLOAD'), but expects an ASCII-file
  219.      (like a capture).
  220.  
  221. `TUPLOAD'
  222.      Same as `TDOWNLOAD', but sends a text file.
  223.  
  224. `TWOGADREQUEST'
  225.      Displays a simple `Yes/No' choice requester and returns the user's
  226.      selection (`YES' or `NO').
  227.  
  228. `WAITSTRING'
  229.      Waits for a certain string to appear from the other side of the
  230.      line.  You can have `term' to wait for almost infinite numbers of
  231.      different strings.  If one of the strings is recognized, it will be
  232.      returned as result.  Case is insignificant.  The global timeout is
  233.      used here, too (e.g.  set it with `set timeout 10 sec').  If the
  234.      given timeout has gone by without a correct string appearing, this
  235.      command will return.  I'd advise *everybody* to use the timeout,
  236.      or `term' will *really* wait, even if it takes years for the
  237.      string to appear...
  238.  
  239.      Example: `waitstring "logon: "'
  240.  
  241. `WRITE'
  242.      Sends the string to the port, but won't display it on term's
  243.      screen.
  244.  
  245.  
  246. The Query command
  247. ******************
  248.  
  249.    The following parameters can be queried with the `QUERY' command
  250. (for example `query baudrate'):
  251.  
  252. `ADOWNLOADPATH'
  253.      The name of the ASCII-Download directory.
  254.  
  255. `AUPLOADPATH'
  256.      The name of the ASCII-Upload directory.
  257.  
  258. `AUDBELL'
  259.      `ON' when set to accoustic signal for the bell characters,
  260.      otherwise `OFF'.
  261.  
  262. `AUTOCAPTURE'
  263.      `ON' if term automatically creates a capture file upon Connect,
  264.      otherwise `OFF'
  265.  
  266. `BAUDRATE'
  267.      The current transfer speed between computer and modem.
  268.  
  269. `BEEPSOUND'
  270.      The name of the IFF-sound which will be played instead of the
  271.      default bell signal.
  272.  
  273. `BITSPERCHAR'
  274.      The number of bits per character.
  275.  
  276. `BLINKING'
  277.      `ON' if the blinking of the terminal is turned on.
  278.  
  279. `BREAKLENGTH'
  280.      Length of the break signal.  (1 million microseconds = 1 second)
  281.  
  282. `BDOWNLOADPATH'
  283.      Name of the binary download directory.
  284.  
  285. `BUPLOADPATH'
  286.      Name of the binary upload directory.
  287.  
  288. `BUSY'
  289.      The character sequence sent by the modem when a busy line is
  290.      recognized.
  291.  
  292. `CAPTUREFILTER'
  293.      When `ON', control sequences won't be saved in the capture file.
  294.  
  295. `CAPTUREPATH'
  296.      Directory, in which the capture files will be saved.
  297.  
  298. `CAPTURESTATE'
  299.      The result will contain the mode of the capture:  `PRINTER' if the
  300.      capture is printed, `FILE' if it is sent to a file.  A combination
  301.      of both is possible when both modes are activated, and `OFF' is
  302.      returned when neither of the two is turned on.
  303.  
  304. `CHARACTERWRAP'
  305.      `ON' if automatic line wrap is turned on.
  306.  
  307. `COLOUR'
  308.      This command will return the hex-value of a certain colour (e.g.
  309.      `query colour 12').
  310.  
  311. `COLOURMODE'
  312.      The screen mode currently active (`AMIGA', `EIGHT', `SIXTEEN',
  313.      `MONO').
  314.  
  315. `COLUMNS'
  316.      The number of characters per line.
  317.  
  318. `CONNECT'
  319.      The result code return from the modem when a connection was
  320.      successfully created.
  321.  
  322. `CONNECTAUTOBAUD'
  323.      `ON' when the transfer rate between modem and computer is
  324.      calculated automatically upon connecting.
  325.  
  326. `CURSOR'
  327.      Position of the cursor.  The resulting string contains the X- and
  328.      Y-position separated by a blank space.
  329.  
  330. `CURSORMODE'
  331.      The mode the cursor keys are interpreted in.  (`STANDARD' or
  332.      `APPLICATION').
  333.  
  334. `CURSORWRAP'
  335.      `ON' if the cursor can be moved without being stopped at screen
  336.      boundaries.
  337.  
  338. `DEFAULTSTORE'
  339.      The name of the directory, where all config-files are stored in.
  340.  
  341. `DIALPREFIX'
  342.      The part of the command sequence sent to the modem preceding the
  343.      number.
  344.  
  345. `DIALRETRIES'
  346.      The maximum number of dial retries.
  347.  
  348. `DIALTIMEOUT'
  349.      The number of seconds term waits for a connection after sending the
  350.      dial string.
  351.  
  352. `DISPLAYMODE'
  353.      The screen displaymode term operates in (`HIRES', `HIRESLACE',
  354.      `SUPERHIRES', `SUPERHIRESLACE', `PRODUCT', `PRODUCTLACE',
  355.      `PALHIRES', `PALHIRESLACE', `PALSUPERHIRES', `PALSUPERHIRESLACE',
  356.      `NTSCHIRES', `NTSCHIRESLACE', `NTSCSUPERHIRES',
  357.      `NTSCSUPERHIRESLACE', `A2024TENHZ', `A2024FIFTEENHZ').
  358.  
  359. `DOWNLOADS'
  360.      The number of files downloaded.
  361.  
  362. `DSBACKSPACE'
  363.      Destructive backspace.  If `ON', a Backspace character will also
  364.      delete the character left of the cursor position.
  365.  
  366. `DUPLEX'
  367.      Transfermode.  Either `FULL' or `HALF'.
  368.  
  369. `EDITOR'
  370.      Name of the editor used when calling the `Edit & upload file'
  371.      function.
  372.  
  373. `EIGHTYCOLUMNS'
  374.      `ON' if the screen is set to 80 x 24 characters.
  375.  
  376. `EMULATION'
  377.      The currently active terminal emulation (`ANSIVT', `ATOMIC',
  378.      `TTY').
  379.  
  380. `ERROR'
  381.      The result code sent by the modem when an error has occurred.
  382.  
  383. `FONT'
  384.      The font used (`TOPAZ', `IBM').
  385.  
  386. `FONTSCALE'
  387.      Size of the font (`NORMAL', `HIGHTOP', `HIGHBOTTOM', `WIDE',
  388.      `HALF').
  389.  
  390. `HANDSHAKING'
  391.      The handshake mode used (`XONXOFF', `RTSCTS', `NONE').
  392.  
  393. `HIGHSPEED'
  394.      `ON' if the high speed mode of the serial device is turned on.
  395.  
  396. `INSERTMODE'
  397.      `ON' if term is currently using the insert mode.
  398.  
  399. `LINE'
  400.      `ON' if a there is a connection to another modem.
  401.  
  402. `LINES'
  403.      The number of lines displayed on the screen.
  404.  
  405. `LOGACTIONS'
  406.      `ON' if all actions of term are logged in a logfile.
  407.  
  408. `LOGFILE'
  409.      Name of the logfile for `LOGACTIONS'.
  410.  
  411. `MACRO'
  412.      Given the two arguments Qualifier (`None', `Shift', `Alternate',
  413.      `Control') and the number of a function key, this function will
  414.      return the definition for that key.  (e.g.: `query macro none 0').
  415.  
  416. `MACROFILE'
  417.      The name of the currently used function key definition file.
  418.  
  419. `MODEMEXIT'
  420.      The command sequence sent to the modem before term terminates.
  421.  
  422. `MODEMHANGUP'
  423.      The command sequence sent to the modem to end a connection.
  424.  
  425. `MODEMINIT'
  426.      The command sequence sent to the modem to initialize it.
  427.  
  428. `NOCARRIER'
  429.      The string sent by the modem when the connection terminates.
  430.  
  431. `NEWLINEMODE'
  432.      `ON' if term operates in the `New line' mode.
  433.  
  434. `NUMERICMODE'
  435.      The mode the numeric keypad operates in (`STANDARD',
  436.      `APPLICATIONS').
  437.  
  438. `OKAY'
  439.      The string returned by the modem when a command was successfully
  440.      executed.
  441.  
  442. `PARITY'
  443.      The current parity mode (`NONE', `EVEN', `ODD', `MARK', `SPACE').
  444.  
  445. `PROTOCOL'
  446.      The transfer protocoll currently defined (e.g.
  447.      `xprzmodem.library', `xprxmodem.library', etc.).
  448.  
  449. `PROTOCOLOPTIONS'
  450.      The options set for the current protocoll.  Check the libraries'
  451.      docs for information on each option.
  452.  
  453. `PUBLICSCREEN'
  454.      `ON' if term's main screen was opened as a public screen.
  455.  
  456. `REDIALDELAY'
  457.      The delay `term' waits after an unsuccessful dial before it tries
  458.      again.
  459.  
  460. `REQUESTERS'
  461.      `ON' if requesters are displayed for the user to confirm certain
  462.      actions.
  463.  
  464. `RING'
  465.      The string sent by the modem when an incoming call is detected.
  466.  
  467. `SCREENADDRESS'
  468.      Returns the address of the `term' main screen as a decimal number.
  469.  
  470. `SENDCR'
  471.      Send a carriage return as line delimiter (`IGNORE', `ASCR',
  472.      `ASCRLF').
  473.  
  474. `SENDLF'
  475.      Send a line feed as line delimiter (`IGNORE', `ASLF', `ASLFCR').
  476.  
  477. `SERIAL'
  478.      `ON' if the serial device is still opened by `term', `OFF' if it
  479.      has been closed.
  480.  
  481. `SERIALDEVICE'
  482.      The name of the serial driver.
  483.  
  484. `SHANGHAI'
  485.      `ON' if windows normally opened on the Workbench are opened on
  486.      term's screen.
  487.  
  488. `SMOOTHSCROLL'
  489.      `ON' if the screen is scrolled a quarter line at a time.
  490.  
  491. `SPEECHFILE'
  492.      The name of the current speech configuration file.
  493.  
  494. `SPEECH'
  495.      `ON' if the speech synthesizer supplied by `term' has been
  496.      activated, else `OFF'.
  497.  
  498. `SPEECHRATE'
  499.      Returns the speaking speech in words per minute.
  500.  
  501. `SPEECHPITCH'
  502.      The speech pitch used by the speech synthesizer.
  503.  
  504. `SPEECHFREQUENCY'
  505.      The speech frequency used by the speech synthesizer.
  506.  
  507. `SPEECHVOLUME'
  508.      The speech volume used by the speech synthesizer.
  509.  
  510. `SPEECHSEX'
  511.      The sex of the voice used by the speech synthesizer (either `MALE'
  512.      or `FEMALE').
  513.  
  514. `STARTUP'
  515.      The command sequence executed upon startup of term (or whatever the
  516.      last connection left in this field).
  517.  
  518. `STATUS'
  519.      The main status of term (`READY', `HOLDING', `DIALING', `UPLOAD',
  520.      `DOWNLOAD', `BREAKING', `HANGUP').
  521.  
  522. `STOPBITS'
  523.      The number of stopbits sent.
  524.  
  525. `TIMEOUT'
  526.      The number of microseconds waited after starting the `INPUT'
  527.      command before it is aborted due to a timeout.
  528.  
  529. `TDOWNLOADPATH'
  530.      The name of the directory in which received text files will be
  531.      stored.
  532.  
  533. `TUPLOADPATH'
  534.      The path to the directory to be used when uploading a text file.
  535.  
  536. `TONEDIAL'
  537.      Will play a telephone number on the Amiga audio hardware using
  538.      touch-tone signal encoding.
  539.  
  540. `UNITNUMBER'
  541.      The unit of the serial device to be used.
  542.  
  543. `VISBELL'
  544.      `ON' if a visual signal is to be used when a bell char is
  545.      displayed.
  546.  
  547. `VOICE'
  548.      The message sent by the modem when a call has been detected that
  549.      does not come from another modem.
  550.  
  551.  
  552. The Set command
  553. ****************
  554.  
  555.    Generally speaking, the `SET' command is the exact opposite of the
  556. `QUERY' command.  Every parameter that `QUERY' takes as an input can be
  557. used with `SET' to change that option.  For example, `query baudrate'
  558. might return `2400', while `set baudrate 2400' would change it.
  559.  
  560.    As the author of these lines is currently suffering from back pains,
  561. and as he doesn't feel to good after a `Non-Stop-Tour-De-Force-
  562. Programming-Marathon', he (that is me) will only note the differences
  563. here.  Please check the `QUERY' description for further information.
  564.  
  565. `BELL'
  566.      Sets the parameters of the Display of the bell character. 
  567.      Currently, the parameters `AUDIBLE' and `VISIBLE' are recognized.
  568.  
  569. `COLOUR'
  570.      Changes a colour.  The first parameter is the number of the colour
  571.      (0 through 15), the second the hex-value of the colour.
  572.  
  573. `MACRO'
  574.      Sets one of the function keys' binding.  The name of the qualifier
  575.      (`none', `shift', `alternate', `control') and the number of the
  576.      key (`0'-`9'), plus the new contents of that key will be needed as
  577.      parameters.
  578.  
  579.      Example: `set macro none 0 hello!'
  580.  
  581. `SCREEN'
  582.      This command is the opposite of the two options `PUBLICSCREEN' and
  583.      `SHANGHAI' (see the `QUERY'-command).  These two options may be
  584.      given as parameters.
  585.  
  586. `TIMEOUT'
  587.      Sets the global timeout.  All read-functions will wait this time at
  588.      most before being canceled.  The time can be given as with
  589.      `DELAY', that is microseconds, seconds and minutes.
  590.  
  591.      Example: `set timeout 10 sec'
  592.  
  593.    Please note:  the Query-options `line', `lines', `columns',
  594. `status', `cursor', `downloads' and `beepsound' do not have a
  595. counterpiece.  Up to now, it is not possible to change the quality of
  596. the line and the physical size of the screen via software (if anybody
  597. can prove the opposite, please send me the source code!).  Positioning
  598. of the cursor should rather be done by using control sequences instead
  599. of changing internal counters...
  600.  
  601.  
  602. Disclaimer
  603. ***********
  604.  
  605.    This  text was translated to english by G.  Glendown.  I have tried
  606. to keep it as exact as possible.  Also, I have re-read it a couple
  607. times to find as many typos as possible.  Please forgive me if I didn't
  608. succeed in finding 'em all...
  609.