[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Selection in Finder

At 14:04 4/29/94 -0500, Mike Lockwood wrote:

>In the upcoming System 7.5 release, we will have a scriptable version of
>the Finder, so you should be able to find the selection by sending the
>Finder Apple events.  I'm not sure, but the scriptable Finder might
>actually be available as part of the AppleScript 1.1 release (don't quote
>me on that, I'm not sure if it has been released yet or not).

The Scriptable Finder is indeed available on the AppleScript 1.1 Developer
Kit.  I understand that it is not available on the "Scriptors Kit".  [In
the form of an Extension which I am told runs with Finder versions back to
7.1, although I've only tried it with 7.1.3 and 7.1.4.]

For those who don't know, the AppleScript syntax is to simply read the
selection is something like

tell application "Finder"
    get selection
end tell

which vast script put this result into the Script Editor result window for
me just now:

{folder "Frontier 3.0" of startup disk of application "Finder", folder
"Anarchie-113" of startup disk of application "Finder"}

As a sort of side note, if you do an Edit menu Copy command in the
Scriptable Finder, you not only get a TEXT object on the scrap (the Names
of the selected icons <return separated in the order the selecting was
done), but also an object specifier which fully specifies them.  Rather

Example (same selection as the above):

{['sdsk'].['cfol'] ["Frontier 3.0"], ['sdsk'].['cfol'] ["Anarchie-113"]}

expressed in Frontier format (after pasting into a Frontier outline)...two
folders at the outer level of my System disk.


jwbaxter@pt.olympus.net (John W. Baxter)  Port Ludlow, WA
finger me to prove I'm all wet (Port Ludlow rainfall numbers).