Re: Metamorphosax! (revisited)
Re: Metamorphosax! (revisited)
- Subject: Re: Metamorphosax! (revisited)
- From: John W Baxter <email@hidden>
- Date: Wed, 7 Feb 2001 13:02:24 -0800
At 10:22 -0800 2/7/01, email@hidden wrote:
>
Subject:
>
>
>>>>I know that the terminal window will scare many Mac OS X users (some of
>
whom SHOULD be scared, but those probably shouldn't use AppleScript
>
either), but in the case of FindFile, it will be difficult to better the
>
traditional Unix find command (and particularly the GNU modernization of
>
it).
>
>
That very common perception, in a nut shell, is why I think there's a lot
>
of foot dragging in getting AppleScript into OSX.
>
>
The fact that an AppleScript command can be done from the terminal window
>
using a Unix command is irrelevant.
>
>
AppleScripts are designed to run independent of user interaction and
>
autonomously. The terminal window is a user interface item. And currently
>
scripting the terminal window with appleScript doesn't cut it.( least not
>
in the Beta)
>
>
Developers (both in and out of Apple) need to understand the difference
>
between AppleScript commands and the Terminal Window. They are not
>
interchangeable.
>
They are to some of us (except that Unix commands are easier ;-) SOMETIMES).
I trust you did read on, where I suggested the *possibility* of
implementing the FindFile FBA by using the Unix tool which finds files.
(Note: it doesn't find by content..that is grep [applied--if necessary--to
the output of find]...so I can find files accessed on February 4 (the real
first Sunday in Feb) 2001 which contain "foo".)
Code reuse.
By the way, a rather useful project might be a (Mac OS X only) scriptable
FBA which wraps the Unix file command. file /path/to/some/file looks at
the file and does an amazingly good job of figuring out from its content
what it is...and for many types it reports useful information such as GIF
dimensions and version, and on and on for other file types. eg...
# file 2rainbo*
2rainbowsSQ.jpg: data
2rainbowsSQThumb.gif: GIF image data, version 89a, 185 x 123,
(I expected more for the jpg file.)
--John
--
John Baxter email@hidden Port Ludlow, WA, USA