Re: launch behavior
Re: launch behavior
- Subject: Re: launch behavior
- From: "S. J. Cunningham" <email@hidden>
- Date: Sat, 07 Nov 2015 15:46:00 -0500
- X_v_e_cd: a03dc431cb103f1e211a143d281aeec3
- X_v_r_cd: cfc64604a78e27a42cde3c82315a08d2
On Nov 7, 2015, at 3:08 PM, S. J. Cunningham wrote:
> I have an script application (not stay open), called "Dead Man Agent.app" with handlers, getInfo() and putInfo(someInfo) which pass/receive information to/from a client script. I call it like this:
>
> tell application "Dead Man Agent"
> launch
> set theInfo to getInfo()
> end tell
>
> ... and later, after changing the info,
>
> tell application "Dead Man Agent"
> launch
> putInfo(someInfo)
> end tell
>
> Sometimes the putInfo works, sometimes it gets a "connection invalid" message. If I copy the exact same call to a stand alone test script, it always works.
>
> It seems as if the first "launch" somehow screws up the second one. But I get the same error message if I take the second one out.
>
> As I understand it, when you launch an app, it opens but does not run. How long does it stay open? Does it close after each call or do I need a separate launch for each call? Do I have to wait for it to finish closing before making the second call? How can I tell if it is still open?
Hmm. If I put a 20 second delay between the two calls, it works. And if I make the Dead Man Agent a stay-open app it works but I can's do that for other reasons.
There appears to be an interval for which it is neither open nor closed.
Steve
------------------
OS X 10.6.8, AppleScript 2.1.2
_______________________________________________
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