Re: Main screen size
Re: Main screen size
- Subject: Re: Main screen size
- From: Sun Real <email@hidden>
- Date: Thu, 25 Jan 2001 13:13:07 +1100
On Wed, 24 Jan 2001 10:32:56 +0100, "Chris Banford" <email@hidden>
wrote:
>
How can I get the size (in pixels) of the main screen?...
Apart from the 3rd party solutions already posted, one can use the Finder:
tell app "Finder"
set dBounds to bounds of desktop's window
--> {1024, 768}
set dSize to size of desktop's window
--> {1024, 748}
end
The first is the full screen size, but is said (by John Delacour) to be
subject to a bug that returns incorrect numbers under some circumstances.
I've never seen it myself, despite having used this a lot.
The second is the same, sans the menu bar of 20 pixels, and was his
suggested workaround.
I can't exactly remember the results of testing these for speed against
say Jon's, but 'screen list' collects quite a bit of info and it does
take a little while. As long as the Finder doesn't go on holiday (get
sidetracked by something else) when you're asking, it's pretty fast.
Cheers,
Richard Morton
-- Great Lies of the Music Business: "Of course I respect you"