launch then run ... then spinning wheel??

I launch an applescript from another main applescript program using the launch command (and it appears in the dock) and then tell it to run. But I just see the spinning wheel; I need to click on the icon in the dock to get it to start the “on run” loop and execute. What am I doing wrong? Why won’t it start the “on run” when it’s issued from the main applescript program?



Hmmm… A simple:

tell app "my applet" to run

Should be good enough.
You can also try this:

tell app "Finder" to open alias "path:to:my applet"

Which will act as a double-click.

The definition for launch is anything such as “prepare an application, so it can receive and send apple-events”.
But it is not a “real” apple event, in certain mode; when you execute a “launch” command, it will wait only untill he knows that the application was launched, then the event will die. But if you use “run”, it will wait untill the complete execution of the “run” handler, unless you specify “ignoring application responses”.