Re: What type is the finder selection?
Re: What type is the finder selection?
- Subject: Re: What type is the finder selection?
- From: John Delacour <email@hidden>
- Date: Tue, 13 Aug 2002 08:11:43 +0100
At 9:31 pm -0600 12/8/02, Doug McNutt wrote:
At 14:01 -0700 8/12/02, Christopher Nebel and Michelle Steiner got
me into looking at class. I appreciate the help. It works so long as
one doesn't try to pick the items out of the list generated with a
drag and drop operation onto an applet.
You can get round that by not using the default typing that the open
handler imposes. Since the items dropped are also the Finders
'selection', you can just tell the Finder to get the selection and
work with that.
Here's an example for a _single_ item:
-- Drop equivalent ...
tell application "Finder" to get selection as string as alias as list
--> {alias "dx:Users:jd:Downloads:"}
open result
on open ls
ls
--> {alias "dx:Users:jd:Downloads:"}
class of item 1 of ls
--> alias
tell application "Finder" to get selection
--> {folder "Downloads" of folder "jd"....
class of item 1 of result
--> folder
end open
JD
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.