Scripts menu while debugging

I'm having this situation:
I often use windows outside the screen for doing things in scripts without disturbing the active layout. When debugging I sometimes need to make such a window visible again, so I have in the scripts menu some tools-scripts like "Make active window visible" amongst others.


Works fine, mostly, but sometimes the whole scripts-menu is not accessible while debugging and I can't figure out why.


Even with the same active layout.
Same privileges.
Same session.

I like to use a global variable $$env (environment) that I set to 'dev' for testing. Then all my scripts have IF conditions around common actions like; window position or perform script (locally or server side).

FileMaker ENV

To toggle that variable I have a 'dev' menu in all my apps. (94.5 KB)

1 Like

I use modifier keys - so when stepping through with the debugger whenever a new window opens the WindowTop Position is a custom function calc like:

cfMyTopPosition :=
if ( Get ( ActiveModifierKeys ) = 8 ; 40 ; Get ( ScreenHeight ) + 10 )

// ALT KEY will bring it into visible space

1 Like

The Scripts-menu is not visible for the users because I use custom menus.
My question is not how to see the new window (I know the techniques you describe) but why is the scripts-menu with the same layout sometimes not accessible?

What version of FileMaker are you using? I believe there is a combination of steps involving Freeze Window and Create New Window then Close Window, where the new window never is actually displayed, which means you may not need to create the window offscreen?

Edit to add: I think perhaps the secret is to make the new window a Card Window style? It's been awhile since I programmed this so I may be misremembering...

I can't tell from your screenshot whether you are on Mac or Windows. There are some 'idiosyncracies' with window handling when using Windows (not sure about macOS).

One of the most frustrating ones is when a frontmost window bases its usable menus on a background window. If custom menus are in use on the background window, it won't allow menus not within the custom menu set to be used in the foreground, even if this is using the standard FileMaker menus. This bug has been there for years.

There has also been a (non-documented) change of behaviour between FMP 19 and FMP 2023 (20), which we are working with a plugin developer to try to resolve. In v20, both floating document and dialog windows remain in the foreground if we use our plugin based open/save file dialog window, say to save an export to a file to a predefined location. This works fine in v19 using the same plugin, but v20 the save/open window remains behind the window it was opened from. If focus is lost, it can be quite a challenge to close it. Card and document windows work OK, but this is causing us headaches at the moment.

Thanks for your reply. It's Mac I'm talking about.
I can believe it's frustrating that change in v20. I had a look-alike thing (on Mac) with closing windows in v20. Filemaker did not reselect the main window after closing the window on top. No window at all was selected and I had to add a "Select Window" after every "Close window" in every script...
Fortunately it has been resolved in the latest update.

1 Like