• 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: Weird feature or???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird feature or???


  • Subject: Re: Weird feature or???
  • From: Michelle Steiner <email@hidden>
  • Date: Sun, 27 Nov 2011 09:02:35 -0700

On Nov 27, 2011, at 8:47 AM, Robert Poland wrote:

When I drop a folder on this script I get the error below.

on open (droppedItem)
display dialog droppedItem
tell application "Finder" to set the_kind to kind of droppedItem
display dialog the_kind
end open

Is there a cure?

Yup:

on open (droppedItem)
display dialog droppedItem
tell application "Finder" to set the_kind to kind of item 1 of droppedItem
display dialog the_kind
end open

Alternatively:

on open {droppedItem}
display dialog droppedItem
tell application "Finder" to set the_kind to kind of droppedItem
display dialog the_kind
end open

Notice that when you drop something on a droplet, it returns a list; you can't get the kind of a list, so it returns the error.

-- Michelle

-- 
Peter pull at St. Taffy's tonight! (Or is it the other way around?)

 _______________________________________________
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

  • Follow-Ups:
    • Re: Weird feature or???
      • From: Robert Poland <email@hidden>
References: 
 >Weird feature or??? (From: Robert Poland <email@hidden>)

  • Prev by Date: Weird feature or???
  • Next by Date: Re: Weird feature or???
  • Previous by thread: Weird feature or???
  • Next by thread: Re: Weird feature or???
  • Index(es):
    • Date
    • Thread