• 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: Display resolution
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Display resolution


  • Subject: Re: Display resolution
  • From: kai <email@hidden>
  • Date: Thu, 10 Mar 2005 20:44:55 +0000


On Wed Mar 9, 2005 4:03:06 am Europe/London, Gnarlodious wrote:

Why not:

set desktopWidth to (word 3 of (do shell script "defaults read /Library/Preferences/com.apple.windowserver | grep -w " & "Width")) as number
set desktopHeight to (word 3 of (do shell script "defaults read /Library/Preferences/com.apple.windowserver | grep -w " & "Height")) as number

Why not indeed. :-)

It's interesting to note that a vanilla variant of this, while a few lines longer, is significantly faster (by about 50 times, here):

--


{}
((path to "pref" local domain Unicode text) & "com.apple.windowserver.plist")
{"Width", "Height"}
text item delimiters "<key>" & & "</key>"
's 2 's text item 2

text item delimiters {""}



--


---
kai
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Strange Script editor behaviour
  • Next by Date: Re: Why does this iPhoto applescript fail to produce new albums with photos in them?
  • Previous by thread: Re: Display resolution
  • Next by thread: Stubborn checkbox
  • Index(es):
    • Date
    • Thread