Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

open window centred in screen

Featured Replies

FMP6

osX 10.3

Can I have applescript open window centred in screen?

Hi rivet,

FileMaker will open it's Windows of a file where ever it was located on your screen prior to being closed.

Try putting the window where you want it to open, and then close it. When you reopen it, it should be where you last put it.

Side note, if this is a solution you are developing for a third party, you might want to ask them where they want the window, or show them how it works. Also, different rolsultions, screen sizes, etc will affect your results.

Here are a couple of Technical Articles by FileMaker Inc:

http://www.filemaker.com/ti/105759.html

http://www.filemaker.com/ti/104768.html

and a couple of files that may help you:

Auto Layout Navigation For Screen Resolution by: Dwayne Wright

http://www.afilemakeraffliction.com

Small Screen by: Claris

http://www.fmfiles.com/dev7.html

Toggle Field Display by: Parker Bennett

http://www.databasepros.com

Window Size by: Ken Edwards

http://www.databasepros.com

HTH

L

  • Author

Thanks Lee, I will take a look.

I should mention that I did have a script for os9, but osX does not like it.

tell application "Finder"

copy the bounds of the window of the desktop to {Sx, Sy, SW, SH}

end tell

tell application "FileMaker Pro"

copy the bounds of the window 1 to {Fx, Fy, FW, FH}

set ctrHor to ((SW - (FW - Fx)) / 2)

set ctrVer to ((SH - (FH - Fy)) / 2)

set the bounds of window 1 to {ctrHor, ctrVer, ctrHor + (FW - Fx), ctrVer + (FH - Fy)}

end tell

rivet, it sounds like you've pretty much got it. Not being booted in OS X at the moment, I can't test. But I imagine your AppleScript error has to do with the exact syntax of calling the "desktop" (try "desktop folder"). They changed it slightly as I remember.

But I don't think you need to call the desktop. You can use the FileMaker functions, Status(CurrentScreenWidth) and Status(CurrentScreenHeight) for that info.

Another cute trick (if I do say so) is the Design function, FieldBounds. You can put a 1x1 pixel field (global, used only for this) in the lower right corner, and get the field bounds. The 3rd and 4th numbers (words) can be used for the window size.

I found the following in an AppleScript someone made for OS X. Perhaps there's a shorter way, but this seems to work.

tell application "Finder"

set {c, d} to screen size of item 1 of (screen list starting with main screen)

end tell

I'm in OS X now, so don't know if it works in 9 or not.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.