Re: Choose File Limited by File Extension OR Type ???
Re: Choose File Limited by File Extension OR Type ???
- Subject: Re: Choose File Limited by File Extension OR Type ???
- From: "Houston, Brad" <email@hidden>
- Date: Thu, 24 Apr 2008 10:30:40 -0700
- Importance: normal
- Priority: normal
- Thread-topic: Choose File Limited by File Extension OR Type ???
Title: Re: Choose File Limited by File Extension OR Type ???
On a similar topic, what happened to the concept of the "creator".
My problem is dealing with eps files (still Type = “EPSF”), in the tens of thousands, some of which are Photoshop raster images, some of which are Illustrator vector art. Since the Mac OS has been "dumbed down" to UNIX, and must now rely on what arbitrary extension someone chooses to stick on a file instead of "knowing" what app created the file, reliability is shot. Add the complication of an general and seemingly irrevocable "open all files of this type" override possibility, and even the applications that created the files sometimes don't know what to do with them. When I check the creator on any random file it's equal odds it's going to say "ART5" (illustrator), "8BIM" (Photoshop), "vgrd", or "", regardless of what it really is, and everything tries to open in Illustrator CS2.
Sorry. Gripe-fest over. It's just that this is the only group that might have a clue as to what I'm talking about.
Does anyone know a solution/alternative/work-around to this problem? To keep this an applescript issue, I have a number of scripts that (did) utilize the “creator” to discriminate what to do with a file.
Thanks,
Brad Houston
On 4/24/08 4:01 AM, "Rick Gordon" <email@hidden> wrote:
> 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_uti
>> s/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
The information contained in this message is intended only for the recipient, and may be a confidential attorney-client communication or may otherwise be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please be aware that any dissemination or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the message and deleting it from your computer. The McGraw-Hill Companies, Inc. reserves the right, subject to applicable local law, to monitor and review the content of any electronic message or information sent to or from McGraw-Hill employee e-mail addresses without informing the sender or recipient of the message.
_______________________________________________
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