• 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
Getting screen resolution the Safari way
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting screen resolution the Safari way


  • Subject: Getting screen resolution the Safari way
  • From: Mr Tea <email@hidden>
  • Date: Wed, 08 Jan 2003 16:28:38 +0000

Scripting limitations in OS X have spawned some ingenious but contorted ways
of getting the size of the desktop (eg, Paul Skinner's handler for digging
it out of the windowserver plist file), so I was interested to notice the
comparatively straightforward method demonstrated in the Safari
'Side-by-Side' script...

on desktop_size()
tell application "System Events"
tell process "Finder"
repeat with i from 1 to the count of windows
if the position of window i is {0, 0} then
return the size of window i
end if
end repeat
end tell
end tell
end desktop_size


It's till not very intuitive, though; rather as if a bunch of builders had
put up a house, then found they'd forgotten to include any doors but worked
out a way to get in by jimmying open the pantry window.


Regards


Mr Tea
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Getting screen resolution the Safari way
      • From: Philip Aker <email@hidden>
    • Re: Getting screen resolution the Safari way
      • From: Paul Skinner <email@hidden>
    • Re: Getting screen resolution the Safari way
      • From: John W Baxter <email@hidden>
    • Re: Getting screen resolution the Safari way
      • From: Shane Stanley <email@hidden>
References: 
 >Re: Safari again (From: Giuliano Gavazzi <email@hidden>)

  • Prev by Date: Re: threads in appleScript
  • Next by Date: limiting numeric runs
  • Previous by thread: Apple: Why aren't all sample scripts downloadable?
  • Next by thread: Re: Getting screen resolution the Safari way
  • Index(es):
    • Date
    • Thread