Re: Passing variables between scripts
Re: Passing variables between scripts
- Subject: Re: Passing variables between scripts
- From: email@hidden
- Date: Tue, 12 Dec 2000 23:26:34 -0500
On Tue, 12 Dec 2000 13:08:15 -0800, Paul Berkowitz <email@hidden> wrote,
>
On 12/12/00 12:43 PM, "email@hidden" <email@hidden> wrote:
>
>
> When you are done using the helper, tell it to quit if you don't want it
>
> hanging around.
>
>
And if you have made the helper a stay-open application, as Scott suggested,
>
then you'll have to add another handler to it:
>
>
on quit
>
continue quit
>
end quit
>
>
or it won't actually quit. Or such has been my limited experience with
>
stay-opens. Is there another way?
I've never found I've had to do this. I just wrote a test script with a run and
idle handler, but with no quit handler, and found it quit just fine. (This is
all under AppleScript 1.3.7 and Script Editor.)
Perhaps there's some confusion regarding the "tell me to quit" behavior, which
doesn't quit at that exact point, but later, when the script returns. That is,
on run
say "One"
tell me to quit
say "Two"
return
end run
This script (saved as stay open) will
a. say "One",
b. note in its applet shell that it should quit when the script is done
c. say "Two", and
d. quit.
Of course, if you have some cleanup you want to do before quitting (closing
files or clearing globals and properties you don't want to be persistent, for
example) you can write your own quit handler, that looks like this,
on quit
-- do cleanup stuff here
continue quit
end quit
--
Scott Norton Phone: +1-703-299-1656
DTI Associates, Inc. Fax: +1-703-706-0476
2920 South Glebe Road Internet: email@hidden
Arlington, VA 22206-2768 or email@hidden