Jump to content
Sign in to follow this  
Ugo DI LUCA

Adjust Windows according to Dock settings

Recommended Posts

Hi,

Any way I can capture the Dock size, scale and position so to decide how to position my FileMaker Windows for Mac users ?

Thanks

Share this post


Link to post
Share on other sites

I'm unsure what a Dock is, but if it's like a Windows task bar, you can use Get(WindowDesktopHeight) and Get(WindowDesktopWidth) to size a window within this space. In this way, even if a task bar is positioned down the right-side, the window will position correctly. Again, I don't know Macs but you might play with these and see how your Mac windows respond. If you get scrolls just decrease height & width size by 1 px and try again.

Hmmm, I'm curious what a Dock looks like now! Can someone attach a picture for me??

Share this post


Link to post
Share on other sites

It appears to me that FileMaker knows where the dock is and what its size is. When you AdjustWindow[Maximize] or [ResizeToFit] it does not override the Dock. So, you could run one of those, capture the WindowWidth and Height, then you'd know.

AppleScript can run shell scripts that can read various attributes, which you could set into variables:

do shell script "defaults read com.apple.dock"

tells you everything about it (way too much)

do shell script "defaults read com.apple.dock largesize"

This is the size, as Unicode text

Screen width - this = maximum window with

do shell script "defaults read com.apple.dock orientation"

do shell script "defaults read com.apple.dock pinning"

do shell script "defaults read com.apple.dock running"

whether it's even running

do shell script "defaults read com.apple.dock autohide"

whether it's showing right now

do shell script "defaults read com.apple.dock mineffect"

scale, suck or genie ???-)

(P.S. Attached is my Dock at the moment. I run a fairly lean one. The background is a Van Gogh painting of an orchard, a little washed out looking under the transparency.)

Dock.pdf

Share this post


Link to post
Share on other sites

Thanks for answering.

I'll have a go this evening as soon as I get back to my computer and project files.

Good thing FileMaker recognizes it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.