• 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: Shane Stanley <email@hidden>
  • Date: Mon, 29 Aug 2016 09:19:47 +1000

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

-- 
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>, <latenightsw.com>


 _______________________________________________
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

  • Follow-Ups:
    • Re: Exiting an app with an infinite loop?
      • From: "@lbutlr" <email@hidden>
    • Re: Exiting an app with an infinite loop?
      • From: "@lbutlr" <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>)

  • Prev by Date: Re: Exiting an app with an infinite loop?
  • Next by Date: Re: "where its" vs "whose"
  • 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