• 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 Additions: Embracing the Horror of Unix
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting Additions: Embracing the Horror of Unix


  • Subject: Re: Scripting Additions: Embracing the Horror of Unix
  • From: email@hidden
  • Date: Sat, 2 Feb 2002 19:25:31 EST

This thread has gone on too long to not chime in : )

1) Since Applescript is digital duct tape, it is 100% appropriate that it
have the ability to access the shell.

2) Since "do shell script" is here to stay, and will in all likelihood be a
significant feature of Applescript in the years to come, then I strongly
encourage the Applescript/OS team to do Whatever It Takes(TM) to make it as
speedy as possible. My testing (G4/400 OSX 10.1.2) shows that each shell call
has an overhead of about 0.10 seconds. This just ain't good enough for
anything repetitive (as Chris Nebel has acknowledged). I don't know what
technical barriers there are, but getting the overhead down to at most 0.005
seconds per call would seem a good goal. 0.001 seconds would be better still.

3) I certainly hope that industrial strength functionality of "do shell
script" won't cause the degradation of the English-like syntax of
Applescript. I hope the most popular functionality of the shell makes its way
into an osax.

4) Does anyone know a way to do the reverse of "do shell script," that is,
call an Applescript handler and use the response in the shell?

Jeff Baumann
email@hidden
www.linkedresources.com


>On 02/01/2002 20:09, "Jon Pugh" <email@hidden> wrote:
>
>> I think my largest point here is that in Mac OS 9, the simplest way to add
>> functionality to AppleScript was to write a scripting addition instead of
an
>> application. Now, in Mac OS X, applications are theoretically easier to
>> write, and scripting additions can generally be replaced by calls to the
>> shell, since they are generally doing simple things that can't be done in
>> straight AppleScript. That means the incentive to write a new scripting
>> addition in OS X is fairly low, as a built-in workaround is pretty easy,
>> considering.

And in a message dated 2/2/02 11:04:34 AM, John C. Welch wrote:

>Actually, I think that creating AppleScript Wrappers around shell commands
>is a very good thing for a few reasons:
>
>1) It uses what is already there. As Jon pointed out, the idea for OSAX is
>to give you the ability to do things you normally cannot do with
>AppleScript. They should not be duplicating existing capabilities. As well,
>reinventing the wheel is usually more work than it's worth
>
>2) It gives AppleScript *far* more value as a system maintenance tool. I
>mean systems maintenance. If I can use familiar syntax to get things done in
>the shell env., then I get to use AppleScript to run my sun boxes, my AIX
>boxes, etc.
>
>3) It also helps calm down the current idiotic religious war about
>AppleScript v. Shell. They both have their places, but if it gives both
>groups better insight into the value of the other groups tools, then things
>get a bit more civil. No, it won't stop the wars, but for those folks who
>aren't complete fanatics, it gives them a path out.
>
>john
>
>
>--
>"Not by strength, but by guile"
>- British Special Boat Service (SBS)


  • Prev by Date: Re: OS X: AS 1.8.2b1: ask System Events for a running process
  • Next by Date: Re: 'path to cleanup at startup folder'
  • Previous by thread: Re: Scripting Additions: Embracing the Horror of Unix
  • Next by thread: Re: Scripting Additions: Embracing the Horror of Unix
  • Index(es):
    • Date
    • Thread