• 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: Script to Get Finder Selection?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Script to Get Finder Selection?


  • Subject: Re: Script to Get Finder Selection?
  • From: "Marc K. Myers" <email@hidden>
  • Date: Fri, 1 Aug 2003 15:46:11 -0400

Date: Thu, 31 Jul 2003 23:35:37 -0400
To: email@hidden
From: "Jonathan Levi, M.D." <email@hidden>
Subject: Script to Get Finder Selection?
Cc: "Jonathan Levi, M.D." <email@hidden>

Hi,

I'm trying to write an AppleScript that utilizes the Finder front
window's selected item(s). For a selection of 1 item,

get selection of application "Finder" as Unicode text

works, but I haven't found any ready way to get a selection
containing multiple items. It looks like I can save this selection,
write it out to a text file, and process the resulting file, but this
will involve handling lots of binary gobbledygook: can anybody
suggest a more straightforward way to access the selection?

I think this will give you what you want:

set theList to {}
tell application "Finder" to set theSel to selection
repeat with anItem in result
set end of theList to anItem as alias
end repeat

The "theList" variable will contain a list of aliases representing the selection.

Marc [08/01/03 3:42:56 PM]
_______________________________________________
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.

  • Prev by Date: Re: [Mail.app] Automated People Sorting
  • Next by Date: Re: Finder's information window in OS X Applescript: nothing works
  • Previous by thread: Re: Script to Get Finder Selection?
  • Next by thread: Re: Script to Get Finder Selection?
  • Index(es):
    • Date
    • Thread