[comp.sys.amiga.tech] Script

rrogers@sumax.UUCP (R. Rogers/MainToad) (11/01/89)

Article 13745 of comp.sys.amiga:
From: MCARTSHA@UREGINA1.BITNET (Shan Mcarthur)
Subject: Script utility needed

>I have elected to do all of my computer assignments on my Amiga in the
>comfort of my own home, but I am having a tough time trying to get a printout
>or even a file of all of the activity flowing through the console.
>Does anyone know of a unix-like script utility for the Amiga?  Has anyone
>patched the console.device to allow for a copy of the i/o to be put in
>a file as well as on the screen?  Simple redirection does not work well
>because it does not include any of the input lines in the file.  I have
>had to edit the files and type them in myself.

I'd like to write a script: device (using M2Amiga) that can be used as a 
replacement for con: to do this.  My idea is to have script: open a con:
window and then just pass the I/O to/from the con: window and echo it 
to a file.  My question is what is involved in getting the Amiga to 
recognize my program as a device, or has something like this already been
done?

zeno@milton.acs.washington.edu (Sean Lamont) (11/01/89)

In article <1048@sumax.UUCP> rrogers%sumax.uucp@beaver.cs.washington.edu (R. Rogers) writes:
>Article 13745 of comp.sys.amiga:
>From: MCARTSHA@UREGINA1.BITNET (Shan Mcarthur)
>Subject: Script utility needed
>
>>Does anyone know of a unix-like script utility for the Amiga?  Has anyone
>>patched the console.device to allow for a copy of the i/o to be put in
>>a file as well as on the screen?  Simple redirection does not work well
>>because it does not include any of the input lines in the file.  I have
>>had to edit the files and type them in myself.

There is a package out that I've seen demo'd (By the owner of the 
company, no less, who I got a chance to chat with)  Which will redirect
all intuition events into a file, which you can then edit and play back
(All mouse events, keyboard events, etc.)  I don't remember the name of
the package, but the company Is ELIPSIS software, and it's somewhere in
the seattle area.  You might try the advertiser index of a major magazine
if you're interested.  Hope this helps.

-- 
|      Sean T. Lamont          |                                         |
|University of Washington      |  "Always be sincere, whether you        |
|ZENO@blake.acs.washington.edu |          mean it or not"                |
|   Savery hall, room 135.     |                                         |

tell@oscar.cs.unc.edu (Stephen Tell) (11/01/89)

You may not have to invent the wheel on this:

As part of dnet, Matt Dillon wrote a "new and improved" pipe: handler,
sometimes called dpipe:.  It is a bidirectional pipe, in many ways like
a unix pty.  It is possible to attach a cli to one side of the pipe,
and have an arbitrary program send stuff to the cli's input and read
from its output.

It works; the scli dnet server uses this to let me open up an Amiga Shell
window on this here sun.  I think it might work very well for a "script"
command.

Problems with it are:  It is not a console device, so typing ^C doesn't
automaticly send SIGBREAKF_CTRL_C to the Shell.  Killing off the shell
is a problem;  Matt's solution is to look for a control-C, and then send
the special sequence "ENDCLI\n" down the pipe before closing.

Perhaps there should be an option for shells/clis to die upon reaching
end-of-file, like Unix shells do?

I don't think programs running under the shell can put the pipe in "RAW" mode.
Actually, you don't want the pipe in "RAW" mode, it is already.  What we wants
to happen is for the pipe to send some sort of packet/message to the program
on the other side, so it can interpret the data stream differently if it wants
to.  PTY: handler anyone?

Lest you think this is comp.sys.amiga.tech.matt.dillon, let me disclaim that
I don't even know the guy, but he writes great stuff!

Steve
----------------------------------------------------------------------
"If it walks like a duck, talks like a duck, and is in black and white,
chances are, it's a MACINTOSH!"

johnl@tw-rnd.SanDiego.NCR.COM (John Lindwall) (11/02/89)

There is a PD utility called HARDCOPY which acts like typescript on Unix.  IE
it captures console I/O to a file.


-- 
John Lindwall                     |   "Not my employer opinions; mine"
johnl@tw-rnd.SanDiego.NCR.COM     |   a man, a plan, a beer, reeban alpa nama
----------------------------------+--------------------------------------------
Amiga PenPal V1.1 for sale: $80. All original disks, manual, box. Registration.