home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 545b.lha / RexxHS / README < prev    next >
Encoding:
Text File  |  1991-09-07  |  2.2 KB  |  71 lines

  1.  
  2. Note: The material in this directory was originally intended to be
  3.       an article in the AmigaWorld Tech Journal... due to scheduling
  4.       problems it's been bumped, so I'm distributing it to the nets.
  5.       The programs are PD, but not the article itself.  I haven't
  6.       removed all references to the AWTJ, but so what....
  7.  
  8.  
  9. ARexx Command Hosts.... using ARexx
  10. -----------------------------------
  11.  
  12. This directory contains a pre-built rexxhs.library file for you to
  13. use.  If you want to build your own, refer to the aztec (for Manx Aztec
  14. users) and sas (for SAS/C users) subdirectories and read the
  15. README file there.
  16.  
  17.  
  18. To run the examples, first copy the rexxhs.library file into your
  19. LIBS: directory.  Copy the .rexx files into REXX:.  Then, start a
  20. new CLI shell (just for convenience) and type
  21.  
  22.          rx samplehost
  23.  
  24. to open a new ARexx command host.  Its ARexx port will be "SAMPLEHOST".
  25. Back in your original shell you can then do
  26.  
  27.          rx samplecall
  28.  
  29. to send commands to the host and get a reply back.  You will be prompted
  30. at the command line for a line to enter.  Type 'help' to get some help,
  31. and typing 'exit' will quit both samplecall and samplehost.
  32.  
  33.  
  34.  
  35. Function Host
  36. -------------
  37.  
  38. If you want, you can experiment with using samplehost as a function host
  39. as well.  Just start samplehost and then from the CLI type:
  40.  
  41.          rx "call addlib samplehost, -50"
  42.  
  43. Now you can do things like:
  44.  
  45.          rx "call set( rc, 5 )"
  46.  
  47. to send a command to the host... play around with it, and when you're
  48. done do a
  49.  
  50.          rx "call remlib samplehost"
  51.  
  52. to clean things up.
  53.  
  54. Important:  SAMPLEHOST must be added to the library list at a LOWER
  55. priority than any of the libraries it uses.  Otherwise, this is what
  56. happens:
  57.  
  58.      1) SAMPLEHOST does a WaitPkt until a message arrives
  59.      2) Then SAMPLEHOST does a GetPkt to get the first message
  60.      3) But GetPkt() is a support library function!  So ARexx has to
  61.         search down the library list, asking everyone in turn if
  62.         they support the GetPkt function.
  63.      4) Since SAMPLEHOST is HIGHER in the list than rexxsupport.library,
  64.         it gets sent a message asking it if it knows about GetPkt...
  65.      5) Endless loop....
  66.  
  67. Boy these things can be tricky...
  68.  
  69.  
  70.  
  71.