On Nov 12, 2009, at 3:34 PM, Jim Skibbie wrote:
Try this ...
launch application "test_app"
tell application "test_app" to Add_Numbers(1, 2, 3)
set y to the result
Let us know how it works.
I think the issue was that my application only had a handler in it, so when it launched, it doesn’t have anything to do and so it immediately quit.
I saved out the handler app with the “Stay open” flag checked and then either solution worked.
If you had written something like ...
tell application "test_app" my doStuff(x, y, z) end tell
then the absence of a run handler would cause a problem because this script assumes there is one and implicitly tries to 'run', hence the immediate quit.
If you want to open an application without starting the 'run' handler, you use 'launch', as in ...
tell application "test_app" launch set y to Add_Numbers(1, 2, 3) end tell
(This script is equivalent to the original, above.) I don't think you need the Stay-Open, just use 'launch'.
|