• 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: Can't get finder selection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't get finder selection


  • Subject: Re: Can't get finder selection
  • From: "J. Stewart" <email@hidden>
  • Date: Mon, 21 Jan 2008 18:30:35 -0500

On 1/21/08 at 12:53 PM, Michelle Steiner <email@hidden> spake thusly:

gives an error "item 1 of selection can't be read" (or whatever it is in english).

I got bit by a quirk in Applescript.

"selection" is a property, not a list, but it looks just like a list in the results pane. You're right; you do need "as list".


Or an explict get

tell application "Finder"
	get first item of (get selection)
end tell

J
--
The Sufis advise us to speak only after our words have managed to pass through three gates.  At the first gate, we ask ouselves, 'Are these words true?'  If so, we let them pass on; if not, back they go.  At the second gate, we ask, 'Are they necessary?'  At the last gate, we ask, 'Are they kind?'  -Eknath Easwaran
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users


This email sent to email@hidden
References: 
 >Re: Can't get finder selection (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: Choose from List & Return Item Number
  • Next by Date: Re: How to parse CSV
  • Previous by thread: Re: Can't get finder selection
  • Next by thread: Re: Can't get finder selection
  • Index(es):
    • Date
    • Thread