• 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: Detect Full Screen?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detect Full Screen?


  • Subject: Re: Detect Full Screen?
  • From: Bill Cheeseman <email@hidden>
  • Date: Mon, 25 Jul 2011 10:15:27 -0400


On Jul 25, 2011, at 9:18 AM, Doug Adams wrote:

tell application "Finder"
set bigBounds to (get bounds of window of desktop)
end tell

tell application "iTunes"
set iBounds to (get bounds of front browser window)
if bigBounds = iBounds then
log "FULL SCREEN"
else
log "NOT FULL SCREEN"
end if
end tell

This is one of those rare cases where GUI Scripting is actually better:

tell application "System Events"
tell process "Safari" -- or whatever
get value of attribute "AXFullScreen" of window 1
end tell
end tell
display dialog result as text

You have to put the script in the Scripts folder and run it from the Scripts menu when the target window is in fact full screen. Running it from Script Editor in another space doesn't see the Safari window, as far as I can tell on a quick test.

-- 

Bill Cheeseman - 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

References: 
 >Re: Detect Full Screen? (From: Doug Adams <email@hidden>)

  • Prev by Date: Re: Lion Sucks?
  • Next by Date: Note on ASE scripting
  • Previous by thread: Re: Detect Full Screen?
  • Next by thread: Re: Detect Full Screen?
  • Index(es):
    • Date
    • Thread