Re: How to 'load' osaxen
Re: How to 'load' osaxen
- Subject: Re: How to 'load' osaxen
- From: Christopher Nebel <email@hidden>
- Date: Thu, 14 Jun 2001 11:34:56 -0700
On Thursday, June 14, 2001, at 04:29 AM, Serge Belleudy-d'Espinose wrote:
I wrote a little installer for one of my projects. It puts files in
place, including osaxen. I want the user to be able to download my
archive, run the installer then the program itself, but on first run
the user gets an error message that shows that the osaxen was not
'loaded'.
Of course restarting solves the problem, but this is unnecessary extra
step since just opening any script editor sort of updates the 'AS
environment'.
So is it possible to script this - w/o even the need to find the script
editor, run it etc. ?
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.
--Chris Nebel
AppleScript Engineering