• 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 Limited by File Extension OR Type ???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Choose File Limited by File Extension OR Type ???


  • Subject: Re: Choose File Limited by File Extension OR Type ???
  • From: Rick Gordon <email@hidden>
  • Date: Thu, 24 Apr 2008 04:01:46 -0700

Thanks. That partially works, but what is not handled (and is also not handled when using the old-style file types) is the enabling of aliases to files of the appropriate type identifier in the Choose File dialog.


set vFileList to choose file of type {"public.jpeg", "public.tiff"} with prompt vPrompt with multiple selections allowed without invisibles

... works on files having either a file type of "JPEG" or "TIFF" or extension of in the list {"jpg", "jpeg", "tif", "tiff"}, but won't recognize aliases or symlinks to those files.


What I'd like to do is to do the above, plus recognize aliases or symlinks having either a file type of "JPEG" or "TIFF" or extension of in the list {"jpg", "jpeg", "tif", "tiff"}, yet leave other files disabled. Right now, my workaround is not to filter by type at the Choose File stage, and filter out selected files that don't have the right characteristics before operating on them.

Rick Gordon

------------------

On 4/24/08 at 6:40 PM +1000, Matthew Smith wrote in a message entitled
"Re: Choose File Limited by File Extension OR Type ???":

>Try using Uniform Type Identifier:
>
>set vFileList to choose file of type "public.image" with prompt vPrompt with multiple selections allowed without invisibles
>
>See:
><http://developer.apple.com/documentation/Carbon/Conceptual/understanding_utis/understand_utis_intro/chapter_1_section_1.html>
>
>--
>Matthew Smith
>
>---------
>
>From: Rick Gordon <email@hidden>
>Date: Thu, 24 Apr 2008 01:25:28 -0700
>To: <email@hidden>
>Subject: Choose File Limited by File Extension OR Type ???
>
>Since there is no reliable correlation between image files with a given file extension (e.g., .jpg, .tif, .jpeg, .tiff) and the existence of a file type (e.g., {"JPEG", "TIFF"}), is there any way to use Choose File or a reasonable facsimile to accomplish something like the line below, where possibly JPEG or TIFF files may exist but have no Finder type?
>
>set vFileList to choose file of type {"JPEG", "TIFF"} with prompt vPrompt with multiple selections allowed

--

___________________________________________________

RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________________

WWW:   http://www.shelterpub.com
 _______________________________________________
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

  • Follow-Ups:
    • Re: Choose File Limited by File Extension OR Type ???
      • From: "Houston, Brad" <email@hidden>
References: 
 >Re: Choose File Limited by File Extension OR Type ??? (From: Matthew Smith <email@hidden>)

  • Prev by Date: Re: Choose File Limited by File Extension OR Type ???
  • Next by Date: Re: Apple Script to make an alias
  • Previous by thread: Re: Choose File Limited by File Extension OR Type ???
  • Next by thread: Re: Choose File Limited by File Extension OR Type ???
  • Index(es):
    • Date
    • Thread