Re: Display resolution
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