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.

Selecting a Dynamic Window

Featured Replies

Trying to produce a system the shows me each step of an automated script and how long it has been running the particular script. But can't figure out why my test script is'nt working. If you run the script over and over it should not produce more than one of each window.

Windows_Test.zip

Edited by Guest

This part makes no sense:

Select Window [ Name: (PatternCount ( WindowNames ;"Export")); Current file ]

The PatternCount() function returns a number, 1 in your case. If you had a window named "1", it would get selected.

  • Author

Yea, I can see that now. More sleep would probably help. Was trying to use that statement to make that window active so that the next statement would re-title the right one. Finding out if a window is open or not seems to be pretty easy, but trying to select that window out of the bunch, when it does not have a set name seems to be a little harder.

Try...

Set Variable[$win; WindowNames(Filename)]

Set Variable[$counter ; 1]

#

Loop

#

#

Select Window [GetValue($win;$counter)]

#

Exit Loop If[PatternCount(Get(WindowName); "Export")]

#

Exit Loop If [$counter = ValueCount($win)

#

Set Variable[$counter; $counter +1]

#

#

End Loop

#

Nice one, DJ. I'm thinking it might be more efficient to loop through the $win variable and when you find a value that contains "Export," you then select the window (not tested)B)

Set Variable[$win; WindowNames(Get(FileName))]

Set Variable[$counter ; 0]

#

Loop

Set Variable[$counter; $counter +1]

Set Variable[$name; GetValue($win;$counter)]

#

Exit Loop If[PatternCount($name; "Export")]

Exit Loop If [$counter >= ValueCount($win)

#

End Loop

#

If[PatternCount($name; "Export")

Select Window [ $name ]

End If

That makes more sense.

One more change came to mind...a dialog if no Export window is found.

#

Set Variable[$win; WindowNames(Get(FileName) )]

Set Variable[$counter ; 0]

#

Loop

Set Variable[$counter; $counter +1]

Set Variable[$name; GetValue($win;$counter)]

#

Exit Loop If[PatternCount($name; "Export")]

#

If[[$counter >= ValueCount($win)]

Show Custom Dialog ["No Export window found."]

Exit Loop If [1]

End If

#

End Loop

#

If[PatternCount($name; "Export")

Select Window [ $name ]

End If

#

  • Author

Wow..cool. Will play with that DJ. Man, seems like there should be easier way like being able to search for the window name based on a partial name and wild card characters.

You can check if you have a window name that begins with "xyz" by setting a $variable to:

Let ( [

pos = Position ( ¶ & WindowNames ; ¶ & "xyz" ; 1 ; 1 ) ;

shortList = Right ( WindowNames ; Length ( WindowNames ) - pos + 1 )

] ;

Case ( pos ; GetValue ( shortList ; 1 ) )

)

Then, if the $variable is not empty, you can Select Window [Name: $variable], else open a new one.

BTW, as a user I would find it very distracting to see a timestamp appended to the window name. I believe windows names are there for the users' benefit - not for the developer's convenience. If you need this information for some purpose, you should store it somewhere out of the users' sight.

  • Author

Thanks Comment, I would agree with you, but this is for insertion into a timed loop script calls other scripts (Mostly exports/import scripts)that is running on the server. No one sees it but me. The windows serve no other purpose other then to mark where in the script it currently is, and how long it has taken to process the particular script. I know, seems like a wierd way of doing it, but was trying to produce something that would require no fields.

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.