Getting screen resolution the Safari way
Getting screen resolution the Safari way
- Subject: Getting screen resolution the Safari way
- From: Mr Tea <email@hidden>
- Date: Wed, 08 Jan 2003 16:28:38 +0000
Scripting limitations in OS X have spawned some ingenious but contorted ways
of getting the size of the desktop (eg, Paul Skinner's handler for digging
it out of the windowserver plist file), so I was interested to notice the
comparatively straightforward method demonstrated in the Safari
'Side-by-Side' script...
on desktop_size()
tell application "System Events"
tell process "Finder"
repeat with i from 1 to the count of windows
if the position of window i is {0, 0} then
return the size of window i
end if
end repeat
end tell
end tell
end desktop_size
It's till not very intuitive, though; rather as if a bunch of builders had
put up a house, then found they'd forgotten to include any doors but worked
out a way to get in by jimmying open the pantry window.
Regards
Mr Tea
_______________________________________________
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.