[comp.sys.amiga.tech] Adding Arexx Port

lofaso@titan.tsd.arlut.utexas.edu (Bernie Lofaso) (03/10/90)

I've recently been comtemplating adding an Arexx port to an existing
application.  The application has an interactive user interface which mearly
accepts commands typed at the console and performs the indicated action,
potentially printing output.  I would like Arexx to be able to send commands
just as the user can type them in.  I would like to be able to receive
commands from both sources simultaneously.  The only way I can think of doing
this is to find the port (and hence signal) that the console is using so I
can either have Arexx send to the console's port, or wait on signal from the
two separate ports simultaneously.  Since I don't know how to get the port
being used by the console, I'm stuck on both solutions.  A third less desirable
solution would be to open a window and open an IDCMP port to recieve both
inputs.  Can someone guide me toward one of these solutions.  The fastest
that does what I want is most desirable.

Bernie Lofaso
(lofaso@titan.tsd.arlut.utexas.edu)

jeh@elmgate.UUCP (Ed Hanway) (03/16/90)

In article <611@titan.tsd.arlut.utexas.edu>,
lofaso@titan.tsd.arlut.utexas.edu (Bernie Lofaso) writes:
>I've recently been comtemplating adding an Arexx port to an existing
>application.  The application has an interactive user interface which mearly
>accepts commands typed at the console and performs the indicated action,
>potentially printing output.  I would like Arexx to be able to send commands
>just as the user can type them in.  I would like to be able to receive
>commands from both sources simultaneously.

I assume the current interface reads a line at a time from the console.
You can do this asynchronously by sending packets directly to the console
handler (you can get the console handler's address from somewhere in your own
Process structure, I think). Then you can wait on both the reply port for
your packet and the AREXX port at the same time.

If the application already uses the AmigaDOS Read() calls, then this should
not take too much effort. If it uses unix-like fread() type calls, then
you might have some more work to do.

Ed Hanway
Eastman Kodak Company	       ...!rochester!kodak!elmgate!jeh
#include <std_disclaimer.h>