get the rect of the OSX dock ?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

get the rect of the OSX dock ?

Post by jmburnod » Mon Sep 19, 2011 9:25 pm

Hi All,

Is there a way to get the rect of the OSX dock ?

Jean-Marc
https://alternatic.ch

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: get the rect of the OSX dock ?

Post by FourthWorld » Mon Sep 19, 2011 10:11 pm

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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: get the rect of the OSX dock ?

Post by jmburnod » Tue Sep 20, 2011 9:07 am

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
https://alternatic.ch

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: get the rect of the OSX dock ?

Post by FourthWorld » Tue Sep 20, 2011 2:28 pm

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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply