Re: get size of available screen fails
Re: get size of available screen fails
- Subject: Re: get size of available screen fails
- From: Adam Bell <email@hidden>
- Date: Wed, 4 Jan 2006 11:11:57 -0400
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.
For dual screens see:
http://bbs.applescript.net/viewtopic.php?id=15425 which includes a test for the existance of dual screens.
On 1/4/06, Emmanuel <
email@hidden> wrote:At 6:31 PM -0700 1/3/06, Robert Poland wrote:
>For some reason the following seems to have quit working, It
>generates an error, "Can't set text item delimiters to
>"<key>Width</key>". It has been working for ages. No recent changes
>that I remember. I have tried restarting Smile and re-launching the
>Finder.
I think that the replies you got, albeit helpful, did not directly
address your question.
As a matter of fact, for some reason that I don't know, you now have
to write (like you had in the past):
set AppleScript's text item delimiters to "blah"
That said, if you're working with plists maybe you should consider
using the plist commands suite in XMLLib.osax
[1].
Also, be aware that some of the plists are now stored as binary
files, so you may experience troubles reading it as text. The latest
version of XMLLib.osax (easily available to the members of SUL, the
discussion list for the users of Smile [2]) understands binary plists.
Finally, if you're using Smile, you can use Smile's enhancements to
AppleScript, namely:
get screen bounds
Emmanuel
[1] <
http://www.satimage-software.com/en/plist_suite.html>
[2] <http://www.satimage-software.com/en/sul.html
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden
This email sent to email@hidden
--
Some minds remain open long enough for a truth to both enter and leave without processing.
_______________________________________________
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