• 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: Exiting an app with an infinite loop?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Exiting an app with an infinite loop? (From: "@lbutlr" <email@hidden>)
 >Re: Exiting an app with an infinite loop? (From: Barry Wainwright <email@hidden>)
 >Re: Exiting an app with an infinite loop? (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: "where its" vs "whose"
  • Next by Date: Re: Exiting an app with an infinite loop?
  • Previous by thread: Re: Exiting an app with an infinite loop?
  • Next by thread: Re: Exiting an app with an infinite loop?
  • Index(es):
    • Date
    • Thread