Re: Pixel range of monitor...
Re: Pixel range of monitor...
- Subject: Re: Pixel range of monitor...
- From: bill <email@hidden>
- Date: Sun, 07 Jul 2002 01:53:00 +0800
David,
At 3:34 PM -0600 7/5/02, David Crowe wrote:
>
Is there a way to obtain the bounds of a monitor in Applescript that works
in
OS X? If it works in OS 9 as well, that would be a bonus.
Well, there9s a file 3/Library/Preferences/com.apple.windowserver.plist2
which has the information of the bounds of a monitor.
You can try:
read alias "bee:Library:Preferences:com.apple.windowserver.plist"
Then parse the relevant info.
Or, if you have one monitor only, and don9t mind to use do shell script, try
the following method:
-- script starts
-- below code in one line
set desktopDimension to (do shell script "defaults -host localhost read |
grep -w \"Width\\" & "|" & "Height\"")
-- above code in one line
{word 6 of desktopDimension, word 3 of desktopDimension}
-- script ends
-- {"1152", "768"}
bill
_______________________________________________
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.