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

Re: Getting screen resolution the Safari way


  • Subject: Re: Getting screen resolution the Safari way
  • From: Paul Skinner <email@hidden>
  • Date: Wed, 8 Jan 2003 15:54:36 -0500

On Wednesday, January 8, 2003, at 11:28 AM, Mr Tea wrote:

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

Also a pity it doesn't work for me. : (

The window at 0,0 has the following properties...

{class:window, value:missing value, minimum:missing value, maximum:missing value, title:"", subrole:missing value, description:"window", size:{0, 0}, focused:true, selected:missing value, enabled:missing value, name:missing value, role:"AXWindow", orientation:missing value, help:missing value, position:{0, 0}}

Now that's a lot of missing values!
--
Paul Skinner
_______________________________________________
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: Paul Skinner <email@hidden>
References: 
 >Getting screen resolution the Safari way (From: Mr Tea <email@hidden>)

  • Prev by Date: Re: associate a file extension with an app/MIME-types
  • Next by Date: Re: GUI scripting 101
  • Previous by thread: Creating Text Notes From Safari Script
  • Next by thread: Re: Getting screen resolution the Safari way
  • Index(es):
    • Date
    • Thread