Skip 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.

Target Window Handling for scripts in FM10

Featured Replies

Hi All -

I'm just curious to see if anyone has had to deal with behavior changes in their solutions with regards to the new way that FM10 handles target windows in scripts.

The following Knowledge Base article outlines the changes: KBArticle

I ran into a problem almost immediately when I opened one of my solutions in FM10. I use a multi-window user interface and resize the windows to fill the screen next to one another. As soon as I opened my solution the windows didn't size properly at all.

I tracked it down to the script I use for sizing the windows. I was simply looping through the list of windows and resizing them using the Move/Resize Window script step. At no time was I using the Select Window step to select the window before resizing each window. The Move/Resize Window step allows you to specify the target window for that step dynamically via a calculation or script variable. That step also makes the window being moved/resized the front most window. So, in FM9, if you followed that step up with a step that sets a variable to Get(WindowWidth) it would return the front most window's(aka the window that was just moved/resized) width.

In FM10, however, the script doesn't automatically target the front most window. Instead, until either the Select Window, New Window, or Close Window step is used, the script targets the window that was the current window when the script was triggered.

So, because I was not using Select Window before each Move/Resize Window step, the script was returning the width of the window that was the current window when the script was triggered instead of the front most window.

I'd love to hear of any other developer's challenges with this. I need to go through my solution and make sure there isn't any other spots that might fall prey to this and feedback from other developer's may point me towards spots that I wouldn't have considered previously.

Thanks all!

Thanks for drawing attention to this.

I'll add one thing that's not new to FM10, but along the same lines:

GTRR (go to related record) when used in a script to target a related file, will not bring that file's window to the front.

However, GTRR when used as a script step applied to a button (i.e. not a script) will bring it to the front.

I had a "need more coffee" moment with this the other day.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.