Hide the frontmost FileMaker window with the window control

Hi everyone!
And especially @MonkeybreadSoftware

I am new here and still trying to find my way around, and I hope I am posting on the right topic. I joined after an invitation from MBS, and I will now try to use this forum instead of writing Chrisitan directly to share with you.

I am building a complex multiwindow solution with data separation and session records. All windows except one can be hidden with the standard FileMaker hide window to free up the screen, since if hiding all, they would no longer be able to activate FileMaker again since all menus are hidden. (The solution runs on both Mac and Windows, and it is on the latter that all menus are, by default in my solution, hidden).

I have activated the hide button in the window frame to hide the last window, letting the OS hide it so it can be opened again.

I have checked out the Window component in MBS and tried "Window.Hide", but from what I can see, it only hides the window the FileMaker way.

So would it be possible to get a function that hides via the OS window button?

I know this can be solved in many different ways outside of FileMaker, but I would like to control the function and incorporate it with the MBS Hotkeys. (Keeping it cross-platform without extra installations or setup on the client side).

Thanks,

1 Like

Welcome to the soup, @HuConn!

As I develop exclusively on and for macOS, I cannot extend to Windows, but it should not be much different.

The (red) window button 'close' actually closes a window. I found no way to attribute a 'hide' action to it.
If the concerned window happens to be the last one related to a FM file, this file will be closed, too.
The 'close' action of said button can be captured in a script triggered by 'OnLastWindowClose'. In the script the window can be hidden by 'Adjust Window' with a 'hide' parameter and the action of closing this last window can be canceled by exiting the script with a return value 'False'.

P.S. I haven't yet explored the extended window handling functionality of the MBS plugin.

The Window.Hide function would hide via OS functions, so FileMaker doesn't know about the window being hidden, which can confuse it.

Hi Torsten and thanks,

It is my bad English and lack of proper terms, but what I mean was that I would like to trigger the window minimize function (yellow button on Mac). I know that it can be accomplished with Command-M on Mac, but want to be able to do it from within FileMaker.

Thanks, Christian, but as I wrote to Torsen, I used the wrong term and talked about hiding the last window when I meant to minimize it. Do you think that might be of interest to more developers than me?

(I know of the key shortcut on Mac, but I want to trigger it from within FileMaker, where I use Ctrl + H to hide all windows but the last one via MBS Hotkey).

The ‘Adjust Window’ with parameter ‘Minimise’ should do this in a script.

3 Likes

Ahh Torsten, you are the best!! Here I have been working with FileMaker for over 30 years, and didn't hink of that! I guess that is because I have never needed that option before, so it must have slipped my mind :smile:

3 Likes

Hi Mikael,
I'm glad that I could provide some help. FileMaker has a lot of switches and I too never finish discovering how they can be used in various contexts.
Cheers
Torsten

I so agree, and one of my problems is that I from time to time find myself thinking in the context of how FileMaker used to work and the slow computers we had back in the days. And another is that I not always take the time to read and test whats new in every versions of FileMaker, something I guess I am not the only one missing... :wink:

... just implemented your suggestion, and it works like a charm with both the button and the Hotkey :smiley: :+1:

2 Likes