Re: launching Script Editor launches app
Re: launching Script Editor launches app
- Subject: Re: launching Script Editor launches app
- From: John W Baxter <email@hidden>
- Date: Thu, 18 Jan 2001 15:02:06 -0800
At 16:03 -0600 1/18/01, Jolly Roger wrote:
>
on 1/18/2001 3:29 PM, Marc K. Myers (email@hidden) wrote:
>
>
>> I have several scripts that immediately launch the associated application
>
>> upon being launched themselves. This is most annoying because the
>
>> application in question (Quark) launches WRONG (Xtensions wacked), and I
>
>> have to quit it and relaunch anyway. What is causing this?
>
>
>
> I'm not sure I understand what you mean.
>
>
He meant that as soon as he OPENS the script in a script editor, the
>
referenced application(s) run.
In that context, it is because QuarkXpress has a bit set which orders
AppleScript to send it an Apple event so that it can return its current
'aete' data (after merging in the running extensions). The dictionary is
needed so that the script can be decompiled to be displayed.
Without that bit, AppleScript sends the event, with the application
running, AppleScript sends the event...if the application doesn't handle it
(most don't) it goes to a System level handler which digs out the 'aete'
resource from the app's resources. If the application does handle the
event, the app returns the 'aete' data, retrieved or manufactured however
the app cares to.
Without the bit, with the application not running, AppleScript digs out the
resource (but only for applications on the same machine).
With the bit, AppleScript launches the application then sends the event.
Now...why the dictionary is wrong if AppleScript launches it is another
issue, which needs to be taken up with Quark. But not by me...I don't have
the program.
--John
--
John Baxter email@hidden Port Ludlow, WA, USA