Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Choose file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Choose file



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>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.