• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Scripting Terminal
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Scripting Terminal
      • From: garbanzito <email@hidden>
  • Prev by Date: Re: Scripting Additions: Embracing the Horror of Unix
  • Next by Date: Re: Scripting Additions: Embracing the Horror of Unix
  • Previous by thread: Re: Photoshop action script
  • Next by thread: Re: Scripting Terminal
  • Index(es):
    • Date
    • Thread