• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
one stay open applet can't start another?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

one stay open applet can't start another?


  • Subject: one stay open applet can't start another?
  • From: "Donald S. Hall" <email@hidden>
  • Date: Mon, 03 Dec 2001 00:16:09 -0700

It appears that one stay open applet can't start another one via the 'run
script' command. The second one just runs and quits. Is there any reason for
this? Is there a way around it?

Here are my two scripts, saved as applets, both with "stay open" checked:

-- test script 1 ----------------------------------------------------
global x
global other
global r

on run
set x to 0
beep
set other to (choose file of type {"APPL"}) -- choose test script 2
end run


on idle
set x to x + 1
if x = 1 then set r to run script other
activate me
display dialog "#1 in idle, x=" & x & return & r as text
beep x
if x > 3 then
quit
end if
return 15
end idle
-- end test script 1 --------------------------------------------------

-- test script 2 ------------------------------------------------------
global x

on run
set x to 0
activate me
display dialog "#2 started"
return "#2 ran"
end run


on idle
set x to x + 1
activate me
display dialog "#2 in idle, x=" & x
beep x
if x > 3 then
quit
end if
return 15
end idle
-- end test script 2 ----------------------------------------------------

1. I start the first script and choose test script 2 as 'other'.
2. The run handler of test script 2 runs - verified by dialog.
3. The run handler of test script 2 completes - verified by dialog in test
script 1 idle handler.
4. The idle handler of test script 1 continues to run every 15 seconds till
programmed death.
5. The idle handler of test script 2 never runs at all.

I can run two stay open applets simultaneously if both are launched from the
Finder.

I'm in OS 9, AS 1.6, but I think I will get the same result in OS X 10.1.

Any enlightenment would be greatly appreciated.

Thanks,

Don
--
Donald S. Hall, Ph.D.
Apps & More Software Design, Inc.
http://www.theboss.net/appsmore
email@hidden


  • Follow-Ups:
    • Re: one stay open applet can't start another?
      • From: Jim Schram <email@hidden>
  • Prev by Date: Re: interesting discovery (trying to get record labels as strings)
  • Next by Date: Re: Filling forms in internet explorer
  • Previous by thread: Re: interesting discovery (trying to get record labels as strings)
  • Next by thread: Re: one stay open applet can't start another?
  • Index(es):
    • Date
    • Thread