Re: unresponsive apps and applescript
Re: unresponsive apps and applescript
- Subject: Re: unresponsive apps and applescript
- From: Ron Hunsinger <email@hidden>
- Date: Wed, 26 Jun 2013 14:11:13 -0700
On Jun 26, 2013, at 1:20 PM, Dee Dee Sommers <email@hidden> wrote:
> Specifically, we have an application that pretty much runs constantly. Except as of late (complicated reason that I need to fully diagnose), the app is going unresponsive when it's just sitting there. We use Applescript to trigger some actions with this app, but when it is unresponsive, the applescripts become very unhappy.
When the app becomes unresponsive, all the Apple Events sent to it will eventually time out (except the ones where you explicitly say not to wait for a response). Put in an error handler to handle the timeout.
I'm not saying this is a trivial task. Your logic flow will be made significantly more complex, because you have to be prepared to handle the error no matter what you were doing at the time. But if the error handler is going to force-quit and restart the application anyway, it might as well quit and restart your AppleScript too, thereby cleaning up whatever mess it's in at the time.
-Ron Hunsinger
_______________________________________________
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