Given an application, standard outputted file type?

Given an application without open documents, is there a way to have it deliver it’s standard file type?
(the file type of a whatever document eventually created by the application).

I’m currently unable to produce a general routine.
Ugly grepping of (info for) doesn’t produce a neat solution, not one working for all applications.
Using the creator type of the launched app, then strolling about the hard disk searching for the first document having that creator type, seems to me also quite unacceptable.

I’d like to use it in the following -very silly- environment:


-- tell my launched app to set theType to it's standard file type
-- if this is not possible, tell Finder to get me this information
-- if he's also unable, maybe someone else can.
set myFiles to choose file with prompt "Choose one or more files" of type theType

Orso

I think you can’t find a reliable method. But you could find an “aproximatte” way to do it. You could try reading the related app’s “Contents/Info.plist” file, searching for and parsing its “CFBundleDocumentTypes” entry (though it won’t contain allways “CFBundleTypeOSTypes” you can use later in the “of type” parameter) → and you should also find your way towards carbon-based apps (you may need Satimage or a similar third-party for resource forks).

Thank you.
Sometimes it’s also nice to know where the jail walls are!

Orso