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.

Featured Replies

Not sure this is the right forum for this question, but since the answer may require Scriptmaker, here goes.

Let's say there are 4 windows open simultaneously in my solution. How can I get the names of the 3rd and 4th windows (where the 1st window is the frontmost and the 4th window is the one behind all the others?)

Hope that makes sense. Many thanks--

You can identify all the window names using WindowNames, and you can identify the front-most window name using Get(WindowName), but there's not a built-in function to identify open windows by their level.

If no windows are minimized/hidden, then

GetValue ( WindowNames ; ValueCount ( WindowNames ) )

should get the backmost window.

The WindowNames function returns the names of open windows, from frontmost stacking order to rearmost, followed by the names of hidden windows. You can use the GetValue() function to parse the output of the WindowNames function into each window name. For example:


GetValue ( WindowNames; 3 ) & ¶ &

GetValue ( WindowNames; 4 )



will return the third and fourth window names, assuming there are that many windows open. If you want the last two in the list you would use:



GetValue ( WindowNames; ValueCount ( WindowNames ) ) & ¶ &

GetValue ( WindowNames; ValueCount ( WindowNames ) - 1 )

I'm not aware of any function that will distinguish between visible windows and hidden windows so the above may return the names of open, but hidden, windows.

Hey, I didn't realize they were in order. Thanks for the info.

Hi Corn,

Please adjust your skill level to Expert, or Certified (which ever is applicable), because you my fried, are no Novice.

Nice to have you participating on the Forum, the Forum will be even better because of it.

Lee

  • Author

Many thanks for your responses, everyone. I want to take this a step further now: I want to use a global calc field to get a listing of all open or hidden windows whose WindowName contains the word "fee". How might I accomplish this?

Hi

no global calculation can give an accurate list of window names...the calc must be unstored.

A way to obtain what you want is to have two calc fields , both with unstored result:

1) wn = calc field with calc:

WindowNames

2) result = repeating calc field with calc:

Let(

value = GetValue ( Extend ( wn ) ; Get ( CalculationRepetitionNumber ) );

Case(

PatternCount ( value ; "fee" ) ; value ;

""

)

)

  • Author

Thanks for your reply. I should mention that the word 'fee' is only a portion of the WindowName. The actual wn might be something like 'Fee | pl.5510'

So is it possible to change this line...

PatternCount ( value ; "fee" ) ; value ;

...to something like this:

PatternCount ( value ; contains the word 'fee' ) ; value ;

Obviously the syntax is wrong because I don't know how to do it correctly.

I should also mention that if my goal can be accomplished using scripts instead of calc fields, that would be fine too.

Thanks again, everyone, for your suggestions. Greatly appreciated.

But have you tried those calculations ?

Because they do exacty what you want, even if "fee" is only CONTAINED into the window name !

  • Author

Ah - - I found a small error in my formula. You are correct, it works!

Now, because it's a repeating field, in repetitions one through five I'm seeing

Is there any way I can display the data from the repeating calc field on a layout without the blank repetitions showing?

For example with another calc field:

List (result)

  • Author

Perfect. Thanks very much for your help!!

I should also mention that if my goal can be accomplished using scripts instead of calc fields, that would be fine too.

If you want to set a field ( YourEvenGlobalField ) with a script:

Set field [ YourEvenGlobalField ; "" ]

Set Variable [$count ; value: 1]

Loop

Set Variable [$value ; value: GetValue ( WindowNames ; $count ) ]

If [ PatternCount ( $value ; "fee" ) ]

Set field [ YourEvenGlobalField ; If ( not IsEmpty ( YourEvenGlobalField ) ; YourEvenGlobalField & ¶ & $value ; $value ) ]

End If

Set Variable [ $count ; value: $count + 1 ]

Exit Loop If [ $count > ValueCount ( WindowNames ) ]

End Loop

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.