Re: Scripting Terminal
Re: Scripting Terminal
- Subject: Re: Scripting Terminal
- From: garbanzito <email@hidden>
- Date: Sun, 3 Feb 2002 12:46:41 -0700
at 2002 02 02, 15:09 +0100, they whom i call Jan Erik Mostrvm wrote:
I tried something like:
tell application "Terminal"
tell window 1
do script with command "ls"
[...]
But I get a new window for each command, which isn't what I'm looking for.
Any ideas of how to send several commands to the same window?
it's a "feature" of Terminal. no way around it except to
stack the commands up on one command line with ";", or to
tell the terminal to run a shell script, which contains the
several commands.
if you really need AppleScript to be interactive with a
single shell session, you might be able to have a script
drive a utility like QuickKeys that could push keystrokes
into the Terminal window. then you'd have to repeatedly read
the contents of the Terminal window to pick up command
results.
--
steve harley email@hidden