Re: get current display resolution
Re: get current display resolution
- Subject: Re: get current display resolution
- From: Charles Arthur <email@hidden>
- Date: Thu, 19 Jul 2001 15:21:37 +0100
On Thu, 19 Jul 2001 12:07:15 +1000, Shane Stanley
<email@hidden> wrote:
>
Do you want the resolution or the size in pixels? If the latter, you can
>
use:
>
>
tell application "Finder"
>
bounds of desktop
>
end tell
>
>
but not in OS X.
Not in my OS9 (9.0.4) either. I get error - can't get bounds of desktop.
The Finder dictionary does however offer "content spaces", which gives open
windows.
So
-- tested
tell application "Finder"
activate
bounds of content spaces
end tell
--
--> {{0, 20, 1024, 768}, {0, 774, 484, 991}, {0, 774, 726, 1461}, {181,
774, 730, 1368}} because I have quite a few windows open.
With other apps hidden, Finder windows closed.. you still get that. It's
telling you what windows are open (even if hidden) in other apps.
I just tested it on 640x480 and it does correctly give {{0,20, 640,480}....}
So it's the third & fourth items of the first item of the list. Phew. Left
as an exercise for the reader.
Charles
----------------------------
http://www.ukclimbing.com : 1000+ British crags, 350+ British climbing
walls - searchable by distance and anything else you care to think of -
with weather forecasts for every one, plus maps, articles, news and
features. Plus Britain's busiest climbing discussion boards. And there's
even a cool shop attached.