Re: Desktop window - size versus bounds
Re: Desktop window - size versus bounds
- Subject: Re: Desktop window - size versus bounds
- From: Bill Briggs <email@hidden>
- Date: Thu, 11 Oct 2001 19:22:12 -0300
At 10:19 PM +0100 11/10/01, Mr Tea wrote:
I mentioned this anomoly in a recent response to Irwin Poche's
contribution about resizing OE message windows, but thought it was
worth a thread of its own.
When the bounds of the Finder's desktop window are asked for in a
script, I would have expected the last two items in the list of four
numbers that is generated to be the same as the two numbers returned
when asking for the desktop window's size.
No, they wouldn't be. They would be the difference between the 4th
and 2nd, and the 3rd and 1st. You get the menu bar considered when
you ask for the content space.
But no. When the size is got, the height of the menu bar is
subtracted from the figure for overall height. Why?
I don't know what OE does, I've never installed it (ABM shop), but
this is not the way the Finder should behave. If you run this you'll
note that items 1 and 3 in the resulting list are identical, as they
should be.
tell application "Finder"
set {x, y, z} to {size of window 1, bounds of window 1,
bounds of content space of desktop}
set windowWide to ((item 3 of y) - (item 1 of y))
set windowHigh to ((item 4 of y) - (item 2 of y))
end tell
{x, y, {windowWide, windowHigh}, z}
- web
blend of the day, orange pekoe