Re: Creator Types in OS X...
Re: Creator Types in OS X...
- Subject: Re: Creator Types in OS X...
- From: Christopher Nebel <email@hidden>
- Date: Fri, 19 Jul 2002 02:25:03 -0700
On Thursday, July 18, 2002, at 12:11 PM, Paul Berkowitz wrote:
On 7/17/02 3:54 PM, "Chris Espinosa" <email@hidden> wrote:
A couple of things here. First, not all applications on X have
creator types, so depending on what you're doing and what apps you
want to use, this may not be a useful exercise at all. On Mac OS X,
most applications have a "bundle identifier" that you can use instead
of the creator type, e.g.
You say "most applications" in OS X. But will Carbon apps which are not
packages have a bundle identifier if they're not bundles? And is there
a standard way of asking for a bundle identifier in any case? What do
you have to know in advance?
Bundled applications typically have a bundle identifier, but are not
required to. Single-file applications typically do not have a bundle
identifier, but may. An application should have at least one of the
two, and most native Mac OS X applications have both.
There isn't any way of getting the bundle identifier from AppleScript
that I'm aware of. (Nothing direct, that is -- you could always dig
around in the file described below.) There's a C API, of course, but
that doesn't do scripters much good.
You can get the bundle id manually by opening the package contents
(control-click on the application and select Show Package Contents).
Open the Contents folder, then open the Info.plist file. (It might be
named something like Info-MacOS.plist instead. If it says it can't find
an application, just use TextEdit.) Look for a line that says
"CFBundleIdentifier" -- the value next to it is the bundle identifier.
The bundle id for single-file applications, if they have one, is in a
'plst' resource, whose contents are the same as an Info.plist file for a
bundled application.
--Chris Nebel
AppleScript Engineering
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.