Do you like to keep your meetings short and sweet? Create a meeting timer as a reminder of when it’s time to wrap up. Do you keep appointments in a FileMaker database? Add a reminder feature to stay on top of things.
These examples illustrate two uses of the script step Install OnTimer Script, new in FileMaker Pro 10. Download the demo file and let’s take a look.
The meeting timer has two displays: a progress bar and a countdown timer. Each is updated by the “Increment Timer” script. This script is called every 30 seconds after the file is opened, when the “OnOpen” script is called. The OnOpen script uses the new script step, Install OnTimer Script. That is the concept behind this new feature: create a script you’d like to call at a specific interval, then trigger it with a separate script that includes Install OnTimer Script.
The countdown display is set to the remaining time, based on the difference between the current time stamp and the meeting end time. The progress bar below the timer is a small web viewer that displays a colored table set to a width corresponding to the time transpired.
The appointment reminder displays a custom dialog as a reminder of upcoming appointments. Click on an appointment in the list to view its reminder preferences.
The timer for the appointment reminder is started when its window is opened. I’ve added this to the Navigate script so that the timer only runs when it is needed.
Some notes about Install OnTimer Script
You can only “install” one timer per window, so if you want to run more than one automated process with a timer, either include them in the same script, or use multiple windows. In this demo I have set up a separate timer for each example, which is why I have the Appointment Reminder layout open in a new window. This way the two timers can run independently.
To stop a timer, either close the window in which it is running, or call the Install OnTimer Script step without specifying an interval.
And that’s it! Dig inside the scripts to learn how I’ve set this up so you can incorporate the ideas into your own solutions. And, feel free to post questions here if you get stuck.