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

Re: Choosing files


  • Subject: Re: Choosing files
  • From: Paul Berkowitz <email@hidden>
  • Date: Tue, 31 Jan 2006 12:43:30 -0800
  • Thread-topic: Choosing files

On 1/31/06 12:15 PM, "Stockly, Ed" <email@hidden> wrote:

>  Hi,
>
> In OS 9 it was possible to write a command to choose file by type, and the
> user would only see appropriate files in the dialog.
>
> In Mac OS X I want to choose file by extension, not type.
>
> In one script the user needs to select only files that end with ".xml"
>
> In another the user needs to select only files that end with {".jpg", ".tif",
> ".TIFF", ".eps", ".pdf","psd"}
>
> Can this be done with standard additions?

You can see that the Dictionary now says (as of AS 1.10 in OS 10.4):

    of type - a list of file types or type identifiers

The Release Notes for 1.10 confirm this:

"The of type parameter to the choose file command now accepts either a list
of file types or a list of type identifiers. [3226364]"

You can find [uniform] "type identifiers" supported in OS 10.4 here:


<http://developer.apple.com/documentation/Carbon/Conceptual/understanding_ut
is/>

Check both Table 3-1 and Table 3-3. (There were far fewer 3rd-party UTIs
supported in 10.3 but 'of type' won't work for UTIs in OS 10.3 anyway.)


You can't "mix and match" with 4-character file types; it's one or the
other.

All the types you ask for are there:

    choose file of type {"public.xml"}
    -- (This seems to include also files with a few other extensions than
.xml that are evidently XML files with proprietary extensions.)

    choose file of type {"public.jpeg", "public.tiff", "com.adobe.pdf",
"com.adobe.encapsulated-‹postscript", "com.adobe.photoshop-‹image"}

There's also a "com.compuserve.gif" for .gif. And you'll find types for
Excel files, etc., etc.

--
Paul Berkowitz


 _______________________________________________
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

  • Follow-Ups:
    • Re: Choosing files
      • From: Paul Berkowitz <email@hidden>
References: 
 >Choosing files (From: "Stockly, Ed" <email@hidden>)

  • Prev by Date: Choosing files
  • Next by Date: Re: Choosing files
  • Previous by thread: Choosing files
  • Next by thread: Re: Choosing files
  • Index(es):
    • Date
    • Thread