Re: Exiting an app with an infinite loop?
Re: Exiting an app with an infinite loop?
- Subject: Re: Exiting an app with an infinite loop?
- From: "@lbutlr" <email@hidden>
- Date: Mon, 29 Aug 2016 10:14:48 -0600
On 28 Aug 2016, at 17:19, Shane Stanley <email@hidden> wrote:
> On 29 Aug 2016, at 8:03 AM, Barry Wainwright <email@hidden> wrote:
>>
>> Would an ‘on idle’ handler be better here than a repeat?
>
> Yep.
>
> on idle
> tell application "System Events" to set myApp to first process where it is frontmost
> tell application "MyAppGoesHere"
> activate
> -- Magic Happens Here
> end tell
> tell application "System Events" to set frontmost of myApp to true
> return 600
> end idle
>
> on quit
> continue quit
> error number -128
> end quit
I will give that a shot, but will that only run when the computer isn’t otherwise being used? The point of my script is it needs to run every 10 minutes, even if I’m doing something else (that’s why I have it set to switch, do stuff, and then switch back).
_______________________________________________
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