• 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: Safari
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Safari


  • Subject: Re: Safari
  • From: Luther Fuller <email@hidden>
  • Date: Wed, 03 Apr 2013 11:55:34 -0500

On Apr 3, 2013, at 11:29 AM, 2551phil wrote:

Can anyone explain under what conditions that would that return "False"?
It returns "True" for me, even when Safari is just idling in the background (i.e, not the active application).

True. I misinterpreted the dictionary.
I've fixed it. Compile this as a Stay Open application ...

on idle
tell application "System Events"
if not (exists process "Safari") then return 1
set safariFrontmost to frontmost of process "Safari"
end tell
if safariFrontmost then beep
return 1
end idle

A quick experiment with Safari will confirm that this works correctly.



 _______________________________________________
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: 
 >Safari (From: Alex Zavatone <email@hidden>)
 >Re: Safari (From: Luther Fuller <email@hidden>)
 >Re: Safari (From: 2551phil <email@hidden>)

  • Prev by Date: Re: Refresh Finder view?
  • Next by Date: Re: Safari
  • Previous by thread: Re: Safari
  • Next by thread: Re: Safari
  • Index(es):
    • Date
    • Thread