Re: Has anyone created a script for AD 2008 home and shares in OS X.5/6?
Re: Has anyone created a script for AD 2008 home and shares in OS X.5/6?
- Subject: Re: Has anyone created a script for AD 2008 home and shares in OS X.5/6?
- From: "Mark J. Reed" <email@hidden>
- Date: Tue, 20 Jul 2010 17:36:02 -0400
On Tue, Jul 20, 2010 at 5:02 PM, Emmanuel LEVY <email@hidden> wrote:
> On Jul 20, 2010, at 7:43 PM, Mark J. Reed wrote:
>
>> I'm confused by the use of AppleScript at all here.
>
> Obvious.
Sorry, what's obvious? It's obvious that it's confusing? Or I'm just
obviously confused? My replacement script was obvious? :)
> For instance, Files.osax has: mkdir for mkdir, fileremove for rm, create
> symlink for ln, etc. Of course it's much faster (50 x for one test with
> fileremove vs do shell script rm) than do shell script "rm" since "do shell
> script has to open a Terminal", whatever it means.
Not a Terminal as in Terminal.app, but a lowercase "terminal", and
more specifically a pseudo-terminal - which is the underlying
mechanism behind console windows and Terminal windows and ssh sessions
and any other means of getting an interactive shell in front of a user
at a keyboard. It all looks the same to the shell, but in this case
instead of a Terminal or ssh session with a human on the other end,
it's really just talking to AppleScript.
Also, if the timing test was of the form
repeat N times
do shell script "rm ..."
end repeat
vs
repeat N times
fileremove ...
end repeat
then I'd be interested in the results when you let the shell do the
looping as well, e.g.
do shell script "for (( i=0; i<" & N & "; ++i )); do rm ...; done"
I expect Files.osax will still win, but perhaps by a smaller margin.
Surprised there isn't a way to delete a file with Standard Additions.
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden