Re: Work the Scripting Addition without restarting....
Re: Work the Scripting Addition without restarting....
- Subject: Re: Work the Scripting Addition without restarting....
- From: Rob Jorgensen <email@hidden>
- Date: Fri, 9 Nov 2001 20:41:16 -0500
On 11/09/2001, Greg Strange commented:
On Friday, November 9, 2001, at 05:07 , Jon Pugh wrote:
At 8:33 AM -0800 11/9/2001, Brian Johnson wrote:
However, before I add a "run script '5'" to all my CGI run
handlers, is there a downside to doing this?
Time and memory.
I seem to remember that Chris Nebel told us of a raw event that
would initialize osaxen. Something like <<event ascrfuft>> or
soemthing like that. Maybe he would be so kind as to remind us of
it.
In case Chris doesn't pick up on this...
At 11:34 AM -0700 06/14/2001, Christopher Nebel wrote:
AppleScript scans for scripting additions at three times: when the
system starts up, when someone opens a connection to AppleScript
(most applications that run scripts do this when they launch), and
whenever a script is compiled.
The easiest way to do the latter is to call "run script" with
something trivial, e.g., "1+1". A faster but somewhat underhanded
way to do it is to tell yourself to <<event ascrgdut>>. That's the
internal event that AppleScript uses to update scripting additions.
And then...
At 12:47 PM -0700 06/15/2001, Christopher Nebel wrote:
For arcane and possibly bogus reasons,
the hander will always report failure, so you have to stick it in a
"try" block and ignore the error.
Which ends up looking something like:
try
tell me
<<event ascrgdut>>
end tell
end try
Later,
Rob Jorgensen
Ohio, USA