• 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: Choose file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Choose file


  • Subject: Re: Choose file
  • From: Bill Cheeseman <email@hidden>
  • Date: Tue, 03 May 2005 16:53:56 -0400

on 2005-05-03 3:57 PM, Michelle Steiner at email@hidden wrote:

> On May 3, 2005, at 12:46 PM, Christopher Nebel wrote:
>
>>> set theImage to choose file of type {"png"} does not work.
>>>
>>> Anyone got any suggestions?
>>
>> Yes -- use the right identifier.  To get the type identifier for
>> any particular file, use "info for" and look at the "type
>> identifier" field.  In your case, you want "public.png".
>
> Where can I find type identifiers documented?  Or do I have to
> execute an "info for" each time I need to script the type
> identifier?  Why couldn't the type identifier for a png file be
> simply "png"?

Chris's answer suggests that this parameter uses Uniform Type Identifiers
("UTI"), a feature introduced in Panther that is blossoming in Tiger.
Indeed, the AppleScript 1.10 release notes say, "The 'of type' parameter to
the 'choose file' command now accepts either a list of file types or a list
of type identifiers."

The AppleScript release notes make for pretty exciting reading. There's a
lot of fixed and new stuff for our enjoyment.
<http://developer.apple.com/releasenotes/AppleScript/AppleScript.html>

UTI's are pretty well documented. The documentation is in the developer
documentation, because UTI's are not limited to AppleScript. Start here:
<http://developer.apple.com/documentation/Carbon/Conceptual/understanding_ut
is/>

--

Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com

PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Choose file (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: Choose file
  • Next by Date: Re: every file in path error
  • Previous by thread: Re: Find in Filemaker
  • Next by thread: Using AS to logout
  • Index(es):
    • Date
    • Thread