• 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
Re: How can we execute remote AppleScript?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can we execute remote AppleScript?


  • Subject: Re: How can we execute remote AppleScript?
  • From: Luther Fuller <email@hidden>
  • Date: Thu, 12 Nov 2009 15:54:23 -0600

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'.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Re: How can we execute remote AppleScript? (From: Jim Skibbie <email@hidden>)

  • Prev by Date: Re: How can we execute remote AppleScript?
  • Next by Date: Encoding of script text
  • Previous by thread: Re: How can we execute remote AppleScript?
  • Next by thread: Re: Finder scripting bugs
  • Index(es):
    • Date
    • Thread