Re: Weird feature or???
Re: Weird feature or???
- Subject: Re: Weird feature or???
- From: Robert Poland <email@hidden>
- Date: Sun, 27 Nov 2011 09:32:54 -0700
Thanks Michelle,
I opted for;
on open {droppedItem} tell application "Finder" to set the_kind to kind of droppedItem …
Subtleties do give weird results.
On Nov 27, 2011, at 9:02 AM, Michelle Steiner wrote: 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
Robert Poland - Fort Collins, CO
|
_______________________________________________
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