<

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

Smart pop-ups (chasing windows)

Published on
12,418 Points
6,218 Views
2 Endorsements
Last Modified:
Approved
Community Pick
Pop up windows can be a useful feature of any Filemaker database.  Though best used sparingly, they can be employed in a multitude of different ways, for example;  as a splash screen at login, during scripted processes to control user input, as picker selection screens, as mini information screens providing user instructions, etc.

Create a pop up window using the New Window* script step, usually followed by Go To Layout then Adjust Window (specify Resize To Fit).

The Move/ Resize Window script step can place pop up windows at a precise spot on the user’s desktop.  Instead of specifying exact positions in the Distance From Top and Distance From Left parameters of this script step, you can use calculations to make the placement of the window dynamic, responding to the current context of the user’s desktop.

A few extra script steps can position pop up windows relative to the main database window’s current position on the user’s desktop.  Wherever the main window moves, your pop up windows can be “smart” and follow suit!

The unlocked sample file attached to this article contains a script showing how to create smart pop windows. Variables are used to store a range of window measurements; Get(WindowHeight), Get(WindowWidth), Get(WindowTop) and Get(WindowLeft).  The values stored in these variables are used to perform calculations inside the Move/ Resize Window script step.  The end result is that the pop up window is positioned in the centre of the main database window, regardless of its position on the user’s desktop.  This works every time, regardless of the pop up window’s dimensions.  

You can play around with the variable values and/ or the calculations in the Move/ Resize Window script step to further adjust the placement of the pop up window, as required.  

*The New Window script step creates a carbon copy of the current window. If you have an active Install OnTimer Script working on the current window, the new window will inherit it!  Remember to deactivate it to avoid unexpected results!
 WindowPlacement.fp7
2
Comment
Author:Tocacar
2 Comments
LVL 8

Author Comment

by:Tocacar
Hi mark_wills

Thanks for your message.  I've just re-uploading the sample file and it looks like it's there now.  Hopefully it can be republished soon.

Kind regards

Tocacar
0
LVL 4

Expert Comment

by:Robert Jackson
Excellent contribution - thanks
0

Featured Post

Learn Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Join & Write a Comment

If you, like me, have a dislike for using Online Subscription anti-spam services, then this video series is for you. I have an inherent dislike of leaving decisions such as what is and what isn't spamming to other people or services for me and insis…
I previously published an Experts Exchange video Micro Tutorial that describes how to scan documents to a PDF file using an excellent, free product called Foxit Reader: How to scan to a PDF file with free software (https://www.experts-exchange.co…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month