• 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: How to test if a dropped item (on open) is a file or folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to test if a dropped item (on open) is a file or folder


  • Subject: Re: How to test if a dropped item (on open) is a file or folder
  • From: Paul Berkowitz <email@hidden>
  • Date: Wed, 03 Jul 2002 13:23:04 -0700

On 7/3/02 1:14 PM, "Spunk S. Spunk III" <email@hidden> wrote:

> This works just fine for me (on X too)...
>
> on open (filesOrFolders)
> set itemOne to item 1 of filesOrFolders
> if folder of (info for itemOne ) then
> display dialog "You dropped a folder on me!"
> else
> display dialog "you dropped a file on me!"
> end if
> end open

But it will tell you that a cocoa app is a folder (try Chess). If that's
what you want, good. If not, check for 'package folder' of info for as well,
as in my last message. It's best then just to get 'info for' once, and set a
variable to it so the record is available for both checks without having to
call the addition again. That's why I wrote it that way in the last message
(which you probably hadn't got yet when you sent this one).

--
Paul Berkowitz
_______________________________________________
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.

  • Follow-Ups:
    • a new user question
      • From: Michael Slade <email@hidden>
References: 
 >Re: How to test if a dropped item (on open) is a file or folder (From: "Spunk S. Spunk III" <email@hidden>)

  • Prev by Date: Re: How to test if a dropped item (on open) is a file or folder
  • Next by Date: Re: Comments Sought - Browser as launcher revisited...
  • Previous by thread: Re: How to test if a dropped item (on open) is a file or folder
  • Next by thread: a new user question
  • Index(es):
    • Date
    • Thread