• 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: What value is an empty "File type"?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What value is an empty "File type"?


  • Subject: Re: What value is an empty "File type"?
  • From: has <email@hidden>
  • Date: Wed, 4 Apr 2007 13:22:04 +0100

Brett Conlon wrote:

I have a bundle script that returns a dialog showing the file type and king of a dropped file on it.

I noticed that there are a number of files with no File Type (as shown in "info for...").

I then tried an if statement to test if the file type is "" then return "not specified"

[...] It's like there is an invisible value in there...

I expect it's four nulls (null = ASCII 0). I think '????' may also be used to indicate unknown type, depending on where the file came from. Not sure if there's others; you'd need to look it up.


Bear in mind that there are several ways in which files and bundles can declare type information in OS X. If you're on Tiger, you might want to read up on Universal Type Identifiers, which provide a uniform mechanism for describing a file's type. Tiger's Finder doesn't give access to type identifier information, though System Events and StandardAdditions do. With bundles, you might also want to examine the bundle identifier to find out more about what type of bundle it is [1]; StandardAdditions can provide you with this.

HTH

has

[1] Though oddly, I notice that using 'info for' on a Script Editor- generated .scptd and .app bundles just gives 'missing value' for the bundle identifier. Wonder if that's a bug or a feature?
--
http://appscript.sourceforge.net
http://rb-appscript.rubyforge.org
http://appscript.sourceforge.net/objc-appscript.html


_______________________________________________
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
  • Prev by Date: Re: What value is an empty "File type"?
  • Next by Date: Re: Sort a List with Integers & Letters
  • Previous by thread: Re: What value is an empty "File type"?
  • Next by thread: Can not get "item" from "position"
  • Index(es):
    • Date
    • Thread