How can you find out the user’s screen dimensions?
Under Panther you could use the following code - but under Tiger this doesn’t work anymore!!!
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
set resolution to size of window i
end if
end repeat
end tell
end tell
Vincent,
There is a command line utility called cscreen that should do what you want.
http://www.pyehouse.com/lynn/cscreen.php
You could then just:
do shell script “cscreen”
and parse out the data you want.
Andy
Model: G4 (Digital Audio) 1.4 GHz (GigaDesigns) 768 MB RAM
AppleScript: 2.0 (v43.1)
Browser: Safari 312
Operating System: Mac OS X (10.3.7)
Thanx!
But I’m searching for a stand-alone solution!
There are always some 3rd party apps which could do this or that thing - but what if I don’t want to have to install dozens of 3rd party stuff to be able to do my stuff
Get the point?
Still hoping.
Vince
If you’re only dealing with one monitor, it’s as simple as:
set {junk, junk, x, y} to bounds of window of desktop