home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d5xx / d534 / term.lha / Term / International / termRexx.doc < prev    next >
Text File  |  1991-08-26  |  24KB  |  514 lines

  1. ================================== term ===================================
  2. ===========================================================================
  3.              A Gift-Ware Telecommunications Program Written by
  4.          Olaf Barthel, © Copyright 1990,91 by Olaf Barthel & MXM,
  5.                            All Rights Reserved.
  6.  
  7.    No  guarantee of any kind is given that the program(s) described in this
  8. document are 100% reliable.  You are using this material on your own risk.
  9.  
  10.  
  11. ============================= term and ARexx ==============================
  12. ===========================================================================
  13. This  document  describes  the ARexx commands supported by `term'.  This is
  14. not  intended  to  be  an  introduction  to  the language itself.  Rexx was
  15. developed by Mike F.  Cowlishaw on an IBM/SP® system (I will not comment on
  16. the quality of that system) and ported to the Amiga by William S. Hawes.
  17.    ARexx (or Amiga Rexx) is a commercial product, that is included with the
  18. AmigaDOS  2.0  Enhancer  Package.   If  you  need  a  good introduction and
  19. description  of  the  language,  try  to  get  ahold  of the book `The REXX
  20. Language  A  Practical  Approach  to  Programming' by M.F.  Cowlishaw.  The
  21. german  version  was  published  by  the  `Carl Hanser Verlag', the english
  22. version is probably available from Prentice-Hall.
  23.  
  24. `term'  opens  an  ARexx host with the name "TERM" (accessable via `address
  25. term').   If  more than a single `term' process is running on your machine,
  26. the  name  of  the  host will be adapted to the number of the program (i.e.
  27. the  first  programm will use `TERM', the second one will use `TERM1',  the
  28. third  one  `TERM2',  etc.).  The name of the host is also displayed in the
  29. title bar of the `term' main screen.
  30.  
  31.    Currently, 38 commands are implemented, which can be divided into
  32. two classes:
  33.  
  34. - Asynchronous  commands,  which  will be executed at once and do not force
  35.   the executing program to wait.
  36.  
  37. - Synchronous commands, that are executed by `term' itself. This might make
  38.   it  neccessary  for  the  ARexx-program to wait for the completion of the
  39.   command.
  40.  
  41.  
  42. ========================= Asynchronous Commands ===========================
  43. ===========================================================================
  44. CLEARDISPLAY........... Deletes the contents of the logbook.
  45.  
  46. CLOSEDISPLAY........... Closes the logbook window, but keeps the contents.
  47.  
  48. DEFAULT2FRONT.......... Brings  the  default  screen to the front.  This is
  49.                         usually the workbench screen.
  50.  
  51. REXX2FRONT............. Pops  the  screen  that  contains  the ARexx-output
  52.                         window to the front.
  53.  
  54. DISPLAY2FRONT.......... Pops the logbook-screen to the front.
  55.  
  56. TERM2FRONT............. Brings the main term program screen to the front.
  57.  
  58. WB2FRONT............... Brings the WB-screen to the front.
  59.  
  60. CLEARDOWNLOADLIST...... The list of received files is deleted.
  61.  
  62. QUERY.................. Ask for several system parameters.  As this command
  63.                         is rather complex, it will be described later.
  64.  
  65. QUIETEXIT.............. The  output  window  is  closed  right  away  after
  66.                         completion.   Usually,  it  waits  for  the user to
  67.                         confirm the action.
  68.  
  69. =========================== The `QUERY' Command ===========================
  70. ===========================================================================
  71. The following parameters can be queried with the `QUERY' command:
  72. Example: query baudrate
  73.  
  74. ADOWNLOADPATH.......... The name of the ASCII-Download directory.
  75.  
  76. AUPLOADPATH............ The name of the ASCII-Upload directory.
  77.  
  78. AUDBELL................ `ON'  when  set  to accoustic signal for the `Bell'
  79.                         characters, otherwise `OFF'.
  80.  
  81. AUTOCAPTURE............ `ON'  if  term automatically creates a capture file
  82.                         upon Connect, otherwise `OFF'
  83.  
  84. BAUDRATE............... The  current  transfer  speed  between computer and
  85.                         modem.
  86.  
  87. BEEPSOUND.............. The  name  of  the  IFF-sound  which will be played
  88.                         instead of the default Bell-signal.
  89.  
  90. BITSPERCHAR............ The number of bits per character.
  91.  
  92. BLINKING............... `ON' if the blinking of the terminal is turned on.
  93.  
  94. BREAKLENGTH............ Length  of  the  break  signal.   (1 million micro-
  95.                         seconds = 1 second)
  96.  
  97. BDOWNLOADPATH.......... Name of the binary download directory.
  98.  
  99. BUPLOADPATH............ Name of the binary upload directory.
  100.  
  101. BUSY................... The  character  sequence  sent  by the modem when a
  102.                         busy line is recognized.
  103.  
  104. CAPTUREFILTER.......... When  `ON', control sequences won't be saved in the
  105.                         capture file.
  106.  
  107. CAPTUREPATH............ Directory,  in  which  the  capture  files  will be
  108.                         saved.
  109.  
  110. CAPTURESTATE........... The  result  will  contain the mode of the capture:
  111.                         `PRINTER'  if  the capture is printed, `FILE' if it
  112.                         is  sent  to  a  file.   A  combination  of both is
  113.                         possible  when  both modes are activated, and `OFF'
  114.                         is returned when neither of the two is turned on.
  115.  
  116. CHARACTERWRAP.......... `ON' if automatic line wrap is turned on.
  117.  
  118. COLOUR................. This command will return the hex-value of a certain
  119.                         colour (e.g. `query colour 12').
  120.  
  121. COLOURMODE............. The  screen  mode  currently  active (AMIGA, EIGHT,
  122.                         SIXTEEN, MONO).
  123.  
  124. COLUMNS................ The number of characters per line.
  125.  
  126. CONNECT................ The  result  code  return  from  the  modem  when a
  127.                         connection was successfully created.
  128.  
  129. CONNECTAUTOBAUD........ `ON'  when  the  transfer  rate  between  modem and
  130.                         computer    is    calculated   automatically   upon
  131.                         connecting.
  132.  
  133. CURSOR................. Position  of  the  cursor.   The  resulting  string
  134.                         contains  the  X-  and  Y-position  separated  by a
  135.                         SPACE.
  136.  
  137. CURSORMODE............. The  mode  the  cursor  keys  are  interpreted  in.
  138.                         (`STANDARD' or `APPLICATION').
  139.  
  140. CURSORWRAP............. `ON'  if  the  cursor  can  be  moved without being
  141.                         stopped at screen boundaries.
  142.  
  143. DEFAULTSTORE........... The  name  of the directory, where all config-files
  144.                         are stored in.
  145.  
  146. DIALPREFIX............. The  part of the command sequence sent to the modem
  147.                         preceding the number.
  148.  
  149. DIALRETRIES............ The maximum number of dial retries.
  150.  
  151. DIALTIMEOUT............ The  number  of seconds term waits for a connection
  152.                         after sending the dial string.
  153.  
  154. DISPLAYMODE............ The  screen  displaymode  term  operates in (HIRES,
  155.                         HIRESLACE,   SUPERHIRES,  SUPERHIRESLACE,  PRODUCT,
  156.                         PRODUCTLACE, PALHIRES, PALHIRESLACE, PALSUPERHIRES,
  157.                         PALSUPERHIRESLACE,     NTSCHIRES,    NTSCHIRESLACE,
  158.                         NTSCSUPERHIRES,   NTSCSUPERHIRESLACE,   A2024TENHZ,
  159.                         A2024FIFTEENHZ).
  160.  
  161. DOWNLOADS.............. The number of files downloaded.
  162.  
  163. DSBACKSPACE............ Destructive   backspace.    If  `ON',  a  Backspace
  164.                         character  will  also  delete the character left of
  165.                         the cursor position.
  166.  
  167. DUPLEX................. Transfermode. Either `FULL' or `HALF'.
  168.  
  169. EDITOR................. Name  of  the  editor  used  when calling the `Edit
  170.                         File' function.
  171.  
  172. EIGHTYCOLUMNS.......... `ON' if the screen is set to 80 × 24 characters.
  173.  
  174. EMULATION.............. The  currently  active  terminal emulation (ANSIVT,
  175.                         ATOMIC,TTY).
  176.  
  177. ERROR.................. The result code sent by the modem when an error has
  178.                         occurred.
  179.  
  180. FONT................... The font used (TOPAZ, IBM).
  181.  
  182. FONTSCALE.............. Size    of    the    font   (`NORMAL',   `HIGHTOP',
  183.                         `HIGHBOTTOM', `WIDE', `HALF').
  184.  
  185. HANDSHAKING............ The handshake mode used (XONXOFF, RTSCTS, NONE).
  186.  
  187. HIGHSPEED.............. `ON' if the high speed mode of the serial device is
  188.                         turned on.
  189.  
  190. INSERTMODE............. `ON' if term is currently using the insert mode.
  191.  
  192. LINE................... `ON' if a there is a connection to another modem.
  193.  
  194. LINES.................. The number of lines displayed on the screen.
  195.  
  196. LOGACTIONS............. `ON'  if  all  actions  of  term  are  logged  in a
  197.                         logfile.
  198.  
  199. LOGFILE................ Name of the logfile for `LOGACTIONS'.
  200.  
  201. MACRO.................. Given  the  two  arguments  Qualifier (None, Shift,
  202.                         Alternate,  Control)  and  the number of a function
  203.                         key,  this  function will return the definition for
  204.                         that key.  (e.g.:  `query macro none 0').
  205.  
  206. MACROFILE.............. The   name  of  the  currently  used  function  key
  207.                         definition file.
  208.  
  209. MODEMEXIT.............. The  command sequence sent to the modem before term
  210.                         terminates.
  211.  
  212. MODEMHANGUP............ The  command  sequence  sent  to the modem to end a
  213.                         connection.
  214.  
  215. MODEMINIT.............. The   command   sequence   sent  to  the  modem  to
  216.                         initialize it.
  217.  
  218. NOCARRIER.............. The  string  sent  by the modem when the connection
  219.                         terminates.
  220.  
  221. NEWLINEMODE............ `ON' if term operates in the `New Line' mode.
  222.  
  223. NUMERICMODE............ The   mode   the   numeric   keypad   operates   in
  224.                         (`STANDARD', `APPLICATIONS').
  225.  
  226. OKAY................... The string returned by the modem when a command was
  227.                         successfully executed.
  228.  
  229. PARITY................. The  current  parity  mode  (NONE, EVEN, ODD, MARK,
  230.                         SPACE).
  231.  
  232. PROTOCOL............... The  transfer  protocoll  currently  defined  (e.g.
  233.                         xprzmodem.library, xprxmodem.library, etc.).
  234.  
  235. PROTOCOLOPTIONS........ The  options  set for the current protocoll.  Check
  236.                         the libraries' docs for information on each option.
  237.  
  238. PUBLICSCREEN........... `ON'  if  term's main screen was opened as a public
  239.                          screen.
  240.  
  241. REDIALDELAY............ The  delay  term  waits  after an unsuccessful dial
  242.                         before it tries again.
  243.  
  244. REQUESTERS............. `ON'  if  requesters  are displayed for the user to
  245.                         confirm certain actions.
  246.  
  247. RING................... The  string sent by the modem when an incoming call
  248.                         is detected.
  249.  
  250. SENDCR................. Send  a  Carriage Return as line delimiter (IGNORE,
  251.                         ASCR, ASCRLF).
  252.  
  253. SENDLF................. Send  a  Line Feed as line delimiter (IGNORE, ASLF,
  254.                         ASLFCR).
  255.  
  256. SERIAL................. ON  if  the  serial device is still opened by term,
  257.                         OFF if it has been closed.
  258.  
  259. SERIALDEVICE........... The name of the serial driver.
  260.  
  261. SHANGHAI............... ON  if windows normally opened on the Workbench are
  262.                         opened on term's screen.
  263.  
  264. SMOOTHSCROLL........... ON  if  the  screen is scrolled a quarter line at a
  265.                         time.
  266.  
  267. STARTUP................ The  command sequence executed upon startup of term
  268.                         (or  whatever  the  last  connection  left  in this
  269.                         field).
  270.  
  271. STATUS................. The  main  status of term (READY, HOLDING, DIALING,
  272.                         UPLOAD, DOWNLOAD, BREAKING, HANGUP).
  273.  
  274. STOPBITS............... The number of stopbits sent.
  275.  
  276. TIMEOUT................ The  number  of  microseconds waited after starting
  277.                         the  `INPUT'-command  before it is aborted due to a
  278.                         timeout.
  279.  
  280. TDOWNLOADPATH.......... The  name  of  the directory in which received text
  281.                         files will be stored.
  282.  
  283. TUPLOADPATH............ The path to the directory to be used when uploading
  284.                         a text file.
  285.  
  286. TONEDIAL............... Will  play  a  telephone  number on the Amiga audio
  287.                         hardware using touch-tone signal encoding.
  288.  
  289. UNITNUMBER............. The unit of the serial device to be used.
  290.  
  291. VISBELL................ ON  if  a  visual  signal is to be used when a BELL
  292.                         char is displayed.
  293.  
  294. VOICE.................. The  message sent by the modem when a call has been
  295.                         detected that does not come from another modem.
  296.  
  297.  
  298. ========================== Synchronous Commands ===========================
  299. ===========================================================================
  300. BDOWNLOAD.............. Starts  a download of a binary file.  A filename is
  301.                         expected, but not needed for protocols like ZModem.
  302.  
  303. BEEP................... Displays  a  BEEP signal,  like  a  sound or screen
  304.                         flash.
  305.  
  306. BREAK.................. Sends a BREAK signal over to the modem.
  307.  
  308. BUFFER................. Initiates  different  logbook actions.  `buffer new
  309.                         file'  uses `file' for logging.  An existing `file'
  310.                         is  replaced.  `set buffer append file' appends all
  311.                         following  logbook  actions to the `file'.  `buffer
  312.                         display' will display the current logbook.
  313.  
  314. BUPLOAD................ Starts  a  binary  upload.   A  filename  has to be
  315.                         supplied,  otherwise  the  transfer  protocol  will
  316.                         complain.  Only a single filename may be given, for
  317.                         multiple uploads check the wildcard-options.
  318.  
  319. CAPTURE................ Changes   the  capture  options.   `capture  close'
  320.                         closes  the  current  capture  file.   `capture new
  321.                         file'  replaces  the  `file'  with the new capture.
  322.                         `capture  append  file'  appends the new capture to
  323.                         the `file'.
  324.  
  325. CLEARSCREEN............ Clears the screen (hey, that was simple!).
  326.  
  327. COMMAND................ Sends a command sequence over the serial line.
  328.  
  329. CONFIG................. Saves  or  restores the konfiguration (`config save
  330.                         file' to save as `file', `config load file' to load
  331.                         `file').
  332.  
  333. DELAY.................. Suspends  script  execution  for  a  certain  time.
  334.                         There  is  now  way  to  stop  this command, so you
  335.                         shouldn't  use  to  long  delays.  The delay may be
  336.                         given in microseconds, seconds or minutes:
  337.  
  338.                            delay 10 mic -> waits ten microseconds
  339.                            delay 10 sec -> waits ten seconds
  340.                            delay 10 min -> waits ten minutes
  341.  
  342. DIAL................... Dials  a  number.  You may also use a name from the
  343.                         phonebook.   If  a  matching  entry  is  found, its
  344.                         number  is dialed.  Please note:  This command only
  345.                         sends  the  dial command to the modem.  Handling of
  346.                         the result has to be done seperately!
  347.  
  348. FIRSTDOWNLOAD.......... The  names  of  all files downloaded during a batch
  349.                         download is kept in a list that can be accessed via
  350.                         ARexx.   This command returns the name of the first
  351.                         file in the list.
  352.  
  353. GETCLIP................ Gets  the  contents of the clipboard and returns it
  354.                         as a string.
  355.  
  356. GETSTRING.............. Queries a string from the user.
  357.  
  358. HANGUP................. Closes   the  current  connection  (if  exists)  by
  359.                         sending the hangup-command to the modem.
  360.  
  361. INPUT.................. Reads a certain number of chars (given when calling
  362.                         the  function) from the port.  If the `set timeout'
  363.                         command  has  been  used, this function will return
  364.                         either  after  receiving  enough chars, or when the
  365.                         timeout is reached.
  366.  
  367. LASTDOWNLOAD........... The  names  of  all files downloaded during a batch
  368.                         download is kept in a list that can be accessed via
  369.                         ARexx.  This  command  returns the name of the last
  370.                         file in the list.
  371.  
  372. MACROS................. Either  saves  or  loads  the  current function key
  373.                         bindings.  (`macros  save  file'  or  `macros  load
  374.                         file')
  375.  
  376. MESSAGE................ Displays  a  text.   This text is not sent over the
  377.                         serial line!
  378.  
  379. NEXTDOWNLOAD........... The  names  of  all files downloaded during a batch
  380.                         download is kept in a list that can be accessed via
  381.                         ARexx.   This  command returns the name of the next
  382.                         file  in  the  list.   Before  using  this command,
  383.                         either  `FIRSTDOWNLOAD' or `LASTDOWNLOAD' must have
  384.                         been called!
  385.  
  386. PHONE.................. Saves or loads the current phonebook.  (`phone save
  387.                         file' or `phone load file')
  388.  
  389. PRINTER................ Turns the logfile-printing on (`printer on') or off
  390.                         (`printer off').
  391.  
  392. PUTCLIP................ Stores a string in the clipboard.
  393.  
  394. RESETSTYLES............ Restores   the   terminal  emulation  to  standard,
  395.                         turning all special attributes off.
  396.  
  397. SAVEILBM............... Saves   the  current  screen  as  an  IFF-ILBM-file
  398.                         (filename to be given by the script).
  399.  
  400. SET.................... Sets  system  parameters.   Please  check  a couple
  401.                         lines down for more information.
  402.  
  403. TDOWNLOAD.............. Starts  a download (as with BDOWNLOAD), but expects
  404.                         an ASCII-file (like a capture..)
  405.  
  406. TUPLOAD................ Same as TDOWNLOAD, but sends a text file.
  407.  
  408. WAITSTRING............. Waits for a certain string to appear from the other
  409.                         side  of the line.  You can have `term' to wait for
  410.                         almost  infinite  numbers of different strings.  If
  411.                         one  of  the  strings  is  recognized,  it  will be
  412.                         returned  as  result.   Case is insignificant.  The
  413.                         global timeout is used here, too (e.g.  set it with
  414.                         `set  timeout  10  sec').  If the given timeout has
  415.                         gone  by  without  a correct string appearing, this
  416.                         command will return.
  417.                         I'd  advise  _everybody_  to  use  the  timeout, or
  418.                         `term'  will  _really_ wait, even if it takes years
  419.                         for the string to appear...
  420.  
  421.                                Example: waitstring "logon: "
  422.  
  423. WRITE.................. Sends  the string to the port, but won't display it
  424.                         on term's screen.
  425.  
  426.  
  427. ============================ The `SET'-Command ============================
  428. ===========================================================================
  429. Generaly  speaking,  the `Set' command is the exact opposite of the `Query'
  430. command.   Every  parameter that `Query' takes as an input can be used with
  431. `Set'  to  change  that option.  For example, `Query baudrate' might return
  432. `2400', while `set baudrate 2400' would change it.
  433.    As the author of these lines is currently suffering from back pains, and
  434. as   he   doesn't   feel   to   good   after   a   `Non-Stop-Tour-De-Force-
  435. Programmingmarathon',  he (that is me) will only note the differences here.
  436. Please check the `Query' description for further information.
  437.  
  438. BELL................... Sets   the   parameters   of  the  Display  of  the
  439.                         `Bell'-char.   Currently,  the  paramters `AUDIBLE'
  440.                         and `VISIBLE' are recognized.
  441.  
  442. COLOUR................. Changes a colour. The first parameter is the number
  443.                         of  the  colour  (0  through  15),  the  second the
  444.                         hex-value of the colour.
  445.  
  446. MACRO.................. Sets one of the function keys' binding. The name of
  447.                         the qualifier (none, shift, alternate, control) and
  448.                         the  number of the key (0-9), plus the new contents
  449.                         of that key will be needed as parameters.
  450.                         
  451.                            Example: set macro none 0 hello!
  452.  
  453. SCREEN................. This  command  is  the  opposite of the two options
  454.                         `PUBLICSCREEN'     and    `SHANGHAI'    (see    the
  455.                         Query-command).   These two options may be given as
  456.                         parameters.
  457.  
  458. TIMEOUT................ Sets  the  global timeout.  All read-functions will
  459.                         wait  this time at most before being canceled.  The
  460.                         time   can   be   given  as  with  DELAY,  that  is
  461.                         microseconds, seconds and minutes.
  462.  
  463.                                 Example: set timeout 10 sec
  464.  
  465.    Please  note:   the  Query-options `line', `lines', `columns', `status',
  466. `cursor',  `downloads'  and  `beepsound' do not have a counterpiece.  Up to
  467. now,  it is not possible to change the quality of the line and the physical
  468. size  of the screen via software (if anybody can prove the opposite, please
  469. send me the source code!).  Positioning of the cursor should rather be done
  470. by using control sequences instead of changing internal counters...
  471.  
  472.  
  473. =============================== Disclaimer ================================
  474. ===========================================================================
  475. This text was translated to english by G.Glendown.  I have tried to keep it
  476. as  exact  as  possible.  Also, I have re-read it a couple times to find as
  477. many  typos  as possible.  Please forgive me if I didn't succeed in finding
  478. 'em all...
  479.  
  480.  
  481. ============== An author's request & gift-ware-remuneration ===============
  482. ===========================================================================
  483. The  development  of  `term'  required conciderable expense.  The effort to
  484. find  out  by  trial and error and with a little help from the DevCon-Disks
  485. and the Includes & Autodocs the operating principles of some routines would
  486. alone  be  worth  a  remuneration to the author (its simply bad luck if the
  487. Atlanta-DevCon records arrive with considerable delay).
  488.    The  author is susceptible to all kinds of donation and gifts so long as
  489. it  is  assured  that  they are useful to him (these nice little sacks with
  490. elephant  food  are  better  sent  to  the Hannover zoo).  Therefore anyone
  491. pleased  by  `term'  or  who  works  with  the  source  code  is welcome to
  492. remunerate  my  programming  efforts  as  he/she  thinks that it matches my
  493. efforts  (If  you've  got  no  ideas  yet:   I  am  looking for the GNU C++
  494. objective  `C'  compiler  in a version executable on the Amiga, old Infocom
  495. games or the source for LhArc or a Modula-2 compiler) - a lot of thanks!
  496.  
  497.                                 My address:
  498.  
  499.                         Olaf Barthel, MXM (ETG030)
  500.                              Brabeckstrasse 35
  501.                            D-W-3000 Hannover 71
  502.  
  503.                         Federal Republic of Germany
  504.  
  505.                          Z-Net: O.BARTHEL@A-Link-H
  506.                    UUCP: o.barthel@a-link-h.zer.sub.org
  507.  
  508.    Would  those  people  looking at the source code to extend it or do some
  509. modifications  here  and there please contact me before publication so that
  510. our efforts can be coordinated.
  511.    If  someone  should  have  a  brilliant  idea  to  improve or extend the
  512. structure and contents of this manual, he/she may do it with my blessing (I
  513. haven't had the enthusiasm up to now to TeXify the text).
  514.