home *** CD-ROM | disk | FTP | other *** search
-
- Note: The material in this directory was originally intended to be
- an article in the AmigaWorld Tech Journal... due to scheduling
- problems it's been bumped, so I'm distributing it to the nets.
- The programs are PD, but not the article itself. I haven't
- removed all references to the AWTJ, but so what....
-
-
- ARexx Command Hosts.... using ARexx
- -----------------------------------
-
- This directory contains a pre-built rexxhs.library file for you to
- use. If you want to build your own, refer to the aztec (for Manx Aztec
- users) and sas (for SAS/C users) subdirectories and read the
- README file there.
-
-
- To run the examples, first copy the rexxhs.library file into your
- LIBS: directory. Copy the .rexx files into REXX:. Then, start a
- new CLI shell (just for convenience) and type
-
- rx samplehost
-
- to open a new ARexx command host. Its ARexx port will be "SAMPLEHOST".
- Back in your original shell you can then do
-
- rx samplecall
-
- to send commands to the host and get a reply back. You will be prompted
- at the command line for a line to enter. Type 'help' to get some help,
- and typing 'exit' will quit both samplecall and samplehost.
-
-
-
- Function Host
- -------------
-
- If you want, you can experiment with using samplehost as a function host
- as well. Just start samplehost and then from the CLI type:
-
- rx "call addlib samplehost, -50"
-
- Now you can do things like:
-
- rx "call set( rc, 5 )"
-
- to send a command to the host... play around with it, and when you're
- done do a
-
- rx "call remlib samplehost"
-
- to clean things up.
-
- Important: SAMPLEHOST must be added to the library list at a LOWER
- priority than any of the libraries it uses. Otherwise, this is what
- happens:
-
- 1) SAMPLEHOST does a WaitPkt until a message arrives
- 2) Then SAMPLEHOST does a GetPkt to get the first message
- 3) But GetPkt() is a support library function! So ARexx has to
- search down the library list, asking everyone in turn if
- they support the GetPkt function.
- 4) Since SAMPLEHOST is HIGHER in the list than rexxsupport.library,
- it gets sent a message asking it if it knows about GetPkt...
- 5) Endless loop....
-
- Boy these things can be tricky...
-
-
-
-