Get screen resolution (OS X)
Get screen resolution (OS X)
- Subject: Get screen resolution (OS X)
- From: julifos <email@hidden>
- Date: Sun, 15 Dec 2002 15:53:48 +0000
Hi all!
Any quick way to Asvanilla-check resolution under OS X? ("old" classic way
"content space" does not work any more)...
I've been trying this code (reading file "com.apple.windowserver.plist") and
it works here, but I don't know if this is universal:
JJ
______________________
getScreenResolution()
on getScreenResolution()
(path to startup disk as text) &
"Library:Preferences:com.apple.windowserver.plist" as alias
set prefs to (read result)
set off1 to (offset of "<key>Width</key>
<integer>" in
prefs) + 30
set off2 to (offset of "</integer>
</dict>
</array>
</array>
</dict>
</plist>
" in prefs) - 1
set width to characters off1 thru off2 in prefs as text
set off1 to (offset of "<key>Height</key>
<integer>" in
prefs) + 31
set off2 to (offset of "</integer>
<key>IODisplayLocation" in prefs) - 1
set height to characters off1 thru off2 in prefs as text
{width, height}
end getScreenResolution
______________________
*if you see some "strange" character, this is ASCII character 10 (LF)
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
_______________________________________________
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.