Page 1 of 1
get the rect of the OSX dock ?
Posted: Mon Sep 19, 2011 9:25 pm
by jmburnod
Hi All,
Is there a way to get the rect of the OSX dock ?
Jean-Marc
Re: get the rect of the OSX dock ?
Posted: Mon Sep 19, 2011 10:11 pm
by FourthWorld
There may be a way to use AppleScript for that, but I don't know specifically how.
What do you want to do with that info?
If you want to simply avoid that region you can use the windowBoundingRect, which is the same as the screenRect minus the menubar region and the Dock region.
Re: get the rect of the OSX dock ?
Posted: Tue Sep 20, 2011 9:07 am
by jmburnod
Hi Richard,
If you want to simply avoid that region you can use the windowBoundingRect
Yes. Exactly what i need
Thank one more
Jean-Marc
Re: get the rect of the OSX dock ?
Posted: Tue Sep 20, 2011 2:28 pm
by FourthWorld
Glad that was helpful.
While you're reading up on the windowBoundingRect, you may also want to check out "the working screenRect", a variant of the screenrect which returns the virtual co-ordinates of each screen's working-area. The working-area of a screen is defined to be the area not convered by OS furniture (such as the task bar on Windows, and the Dock and Menubar on Mac OS X).
Note that the windowBoundingRect is settable, and the working screenRect can be used to reset it to default values if needed.