Re: choose file of type
Re: choose file of type
- Subject: Re: choose file of type
- From: Bill Briggs <email@hidden>
- Date: Fri, 25 Nov 2005 17:47:14 -0400
At 1:21 PM -0800 11/25/05, Paul Berkowitz wrote:
>
>Yes, {"public.plain-text"} works for all .txt files I can find, and more.
>Although .xls Excel files are found by "com.microsoft.excel.xls", you can't get .csv files made by Excel from "com.microsoft.excel.csv" . But
>"public.plain-text" _does_ pick those up too (just as file type "TEXT" does) if the file was made by Excel Mac.
I saved a .csv file from my Eudora address book and get the following
default application:alias "OS X:Applications:Text Editors:Alpha:TextEdit.app:", kind:"Text document", file type:"TEXT", file creator:"ttxt", type identifier:"com.apple.traditional-mac-plain-text"
...so the type identifier is different, but when I run
choose file of type {"public.plain-text"}
... I can still select the .csv file Eudora saved. This .csv file also shows a text icon, but even if I change its type to "????" I can still select it in the choose file dialog.
>Interestingly, I have a couple of .csv and .CSV files brought over from
>Excel Windows. These files show no icons, and neither "public.plain-text"
>nor "com.microsoft.excel.csv" work for them in 'choose file'. But if you
>double-click them, they open immediately in Excel 2004, with no preliminary
>"select app" dialog. So there's still something like OS 9's File Exchange
>working that knows that Excel is the default app for .csv (and CSV) but that
>still doesn't register a "type identifier" for it. I wonder what the
>difference is then between this connection and a true "type identifier" is.
Not sure, but there's something else going on there.
>I know that the .csv files made by Excel Mac have a "TEXT" file type, and I
>imagine that that sets a "public.plain-text" type identifier. But the
>Windows .csv files don't have this type identifier.
>
>Running your script on such a file results in UTI =
>
> --> "dyn.age80g650"
>
>! I wonder where I got this - maybe from a user of one of my scripts. Weird.
>I'll test with some files brought over directly from Excel Win in VPC soon,
>and see what I get.
I ran it on a .shw file someone sent me from Windows and I get a similarly odd UTI
type identifier:"dyn.age81g4d1"
Not sure what generates that thing.
- web
_______________________________________________
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