Applet- Stay open, but also actually do something


(Eric) #1

A parent script starts an upload process and exits. Before it exits, it launches a watcher applet.
The watcher checks on the upload process. I see launch and appear it in the dock. However it does not actually run. If I click on it in the Dock, it immediately quits.

The code in the watcher applet is just a collection of the usual tell statements. There isn’t a script object. It doesn’t have ‘on run’ or ‘on quit’ handlers, but I’m thinking that might be the way to go.
It runs just dandy if I double-click it, just never when told to launch from the parent script.


(Mark Alldritt) #2

How are you launching the watcher applet? If its a sub-process of the main process then Unix rules dictate that it is killed with the parent process exits.


(Eric) #3

Aha!
I do it like this-
tell application watcher_robot to launch