Where is my app?
Where is my app?
- Subject: Where is my app?
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 13 Aug 2001 10:18:41 -0700
Now that many applications are sending two versions - one for OS 8/9, one
for OS X - I'm having trouble in finding the correct version for OS 9 by
script. (Forget OS X for the moment.)
I'm used to finding an app via 'application file id "xxxx"' in the Finder,
setting a variable to the path so found as string, launching the app, and
coding its commands in raw code so it will compile in the variable tell
block. (Sometimes known as the "Smile" solution to the tell-by-variable
conundrum.) In the past, this has always worked on users' machines to avoid
the "Where is...?" dialog. But now, I can't get to base 1 on my own machine.
To start with, the Finder is refusing to cooperate. When I tried
tell app "Finder" to set GraphC to (application file id "GKON") as
string
it announced that it couldn't. Presumably this is because he last version I
had open of Graphic Converter was the OS X version, which the OS 9 Finder
can't deal with - doesn't consider it an application. (In the OS X Finder,
'application file id' doesn't even exist.)
So I tried Akua's '(path to creator "GKON") as string'. That got me a
rather perplexing
"Apps HD:Applications (Mac OS 9):GraphicConverter US PPC::"
which couldn't be used in a tell block. (Note the "::" at the end?) It later
worked OK when GC PPC was open, but that begs the question. later again,
it found the OS X version, which didn't help.
The Satimage osax's 'path to application "GKON"' worked fine - this time.
I'm not sure if it will always find the OS 9 version - I'll keep trying to
see. It's odd that they all work differently, and doesn't seem very
reliable. My situation may be compounded in that my apps don't live on my OS
9 startup disk but on a separate partition, but so will many people's apps.
So it seems to me that I simply will have to insist that users keep the
correct OS 9 version of their apps open the first time they use a script,
and every time they upgrade an app, and I will use the normal 'tell
application "Graphic Converter PPC"' block with application keywords, not
raw code. If they don't, they'll have to answer to "Where is Graphic
Converter PPC?"
Anyone see another solution?
--
Paul Berkowitz