Re: Forcing script to recognize application on startup disk.
Re: Forcing script to recognize application on startup disk.
- Subject: Re: Forcing script to recognize application on startup disk.
- From: John W Baxter <email@hidden>
- Date: Fri, 3 Nov 2000 08:59:24 -0800
At 1:41 -0800 11/3/00, Richard 23 wrote:
>
>Is there a way I missed to force my scripts to open the copies of
>
>applications on my new startup disk, short of deleting copies on other
>
>disks, as I was forced to do?
>
>
Your computer probably sees no pressing need to change the application
>
it launches for a given creator code because the applications on your
>
new disk are the same (and have the same modification date) as those
>
on the old disk. It would probably re-evaluate this supposition if you
>
were to prevent the old disk from mounting at startup. I'm not sure
>
whether a rebuild of the desktop would also be necessary. Once it
>
determines where the "new" applications are you should be able to
>
start up as usual.
>
>
A useful method to avoid the "Where is...?" dialog is to place an alias
>
in your Script Editor's folder for each of your applications (useing the
>
same names).
>
>
R23
AppleScript remembers more than the creator code when it targets an
application in a compiled script. If it were just the creator code, then
the launched application would be
1. the newest one in the same directory as the script
2. the newest one on the same volume as the script
3. the newest one on some other volume, searched by mount order and
stopping when the needed creator code is found (even if some other volume
has a newer one).
(Or, that was the convoluted sequence up until recently...it may have
changed to a slightly different convoluted sequence).
The above rules are, for example, why one does not double click an MPW text
file on a CD containing MPW (unless one's installed MPW is running): rule
2 causes the copy of MPW on the CD to run. After much arm-waving (even
fast CDs are slow, but I haven't made this mistake on anything faster than
4x), MPW realizes that it was started from a locked volume, and puts up an
alert saying it can't run from a locked volume, and quits when the alert is
dismissed).
I once induced AppleScript to try to launch a Think C project file as if it
were an application (it got the thing into memory and passed control to it,
leading to a nice crash). This was before Think C was adjusted to allow
tell application "I'mRunningUnderThink"
...
end tell
to work "better."
There was an intermediate step in which the script launched Think C--I
prevented that (by unmounting the drive, I think).
--John
--
John Baxter email@hidden Port Ludlow, WA, USA