Re: get size of available screen fails
Re: get size of available screen fails
- Subject: Re: get size of available screen fails
- From: Björn Lundin <email@hidden>
- Date: Wed, 4 Jan 2006 21:45:37 +0100
4 jan 2006 kl. 16.11 skrev Adam Bell: For one screen, this works:
do shell script "echo `defaults read /Library/Preferences/com.apple.windowserver | grep -wA 1 -m 1 OriginX` `defaults read /Library/Preferences/com.apple.windowserver | grep -w -m 1 Height``defaults read /Library/Preferences/com.apple.windowserver | grep -w -m 1 Width`"
Note that the back slanted single quotes ` are NOT '
returning: "OriginX = 0; OriginY = 0; Height = 870; Width = 1152;" on my setup.
if you don't want the backticks, yu can exchange them to $( and ) as in below
echo $(defaults read /Library/Preferences/com.apple.windowserver | grep -wA 1 -m 1 OriginX) $(defaults read /Library/Preferences/com.apple.windowserver | grep -w -m 1 Height) $(defaults read /Library/Preferences/com.apple.windowserver | grep -w -m 1 Width)
OriginX = 0; OriginY = 0; Height = 768; Width = 1024; on my setup
Not tested with 'do shell script' but works in the shell. Perhaps the $ needs escaping?
/Björn
Björn Lundin bnl at spray dot se
|
_______________________________________________
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