• 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: Pixel range of monitor...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Mailman related question
  • Next by Date: Scripting the desktop icon size in OS X
  • Previous by thread: Re: Pixel range of monitor...
  • Next by thread: How to get a base64-String from a File?
  • Index(es):
    • Date
    • Thread