Re: Weird feature or???
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