Re: unresponsive apps and applescript
Re: unresponsive apps and applescript
- Subject: Re: unresponsive apps and applescript
- From: Dee Dee Sommers <email@hidden>
- Date: Wed, 26 Jun 2013 17:24:23 -0400
Hi Ron,
Thank you! This makes simple sense!
So you are suggesting that at the beginning of my Applescript, I do a Try command. (e.g., activate)
And on error, then call a shell script to killall the_sleepingApp?
And then go ahead and activate the app again?
Is there any way I can set a flag someplace so I know to restart the Applescript?
Thanks,
Dee Dee the clueless noob
On Jun 26, 2013, at 5:11 PM, Ron Hunsinger wrote:
>
> 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
_______________________________________________
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