<

Smart pop-ups (chasing windows)

Published on
12,306 Points
6,106 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Join & Write a Comment

Discover the basics of using Outlook 2016 from office 365.
See the Basics of Office 365's Note Taking app, OneNote

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month