• 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: What type is the finder selection?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: What type is the finder selection?
      • From: Christopher Nebel <email@hidden>
    • Desktop printer files are really folders
      • From: Doug McNutt <email@hidden>
References: 
 >Re: What type is the finder selection? (From: Christopher Nebel <email@hidden>)
 >Re: What type is the finder selection? (From: Doug McNutt <email@hidden>)

  • Prev by Date: Re: File Association
  • Next by Date: Virtual Printer spooler
  • Previous by thread: Re: What type is the finder selection?
  • Next by thread: Desktop printer files are really folders
  • Index(es):
    • Date
    • Thread