HOME

January 19, 2010

Teaching the Database to Speak

I call this: tech — Posted by KP @ 2:40 am

I have to tell you what I learned tonight. I must caution you, there is some geek-speak below, in as plain terms as possible.

I was watching a screencast from Filemaker, about the fun new things you can do in Filemaker Pro 10. This isn’t really news to me, as I’ve been using v. 10 for months, and the last version I owned before that was v. 7. But this particular screencast began by talking about the ontimer script feature. That’s not something I’ve really worked with much, except that I have a Filemaker clock that I found online, and basically tinkered with just enough to add it to my database, without exactly understanding how all of it works.

This screencast explained it (it’s actually really simple, it just executes a specified script every however-many seconds), and suddenly I figured out how to do something that I knew was theoretically possible, but thought was outside my programming knowledge: to get the performance report to remind me to make calls based on what time it is.

The report already has an “intermission calculator” where I can enter how long I want the intermission to be, and based on the end time of Act I, it displays what time I need to call 5 and places (assuming it takes 3 minutes from calling places to actually being able to start). It does the math for me, but it doesn’t help to remind me in any way, I still have to keep watching the clock.

Well using the ontimer script, which I have running every 10 seconds when the performance report is loaded, it records the current time as a variable, and then goes down the list of possible calls (30 minutes, 15 minutes, 6 minutes, and 2 minutes before the scheduled start time, as well as the “call 5 at” and “call places at” times from the intermission calculator), comparing the current time to those times.

I added a series of fields to each report that corresponds to each call that needs to be made — by default the value is 0 (the call has not been made). The script looks through each of the possible calls whose value is 0, and then looks to see if the current time is greater than or equal to the time one of the calls is due. If so, it says — out loud — the call (i.e. “Half hour please”) and then displays a pop-up window saying “Call half hour now!” Once this window is dismissed, the call field changes from 0 to 1, and from that point on, the script no longer worries about that call.

It’s absolutely hysterical. But most of all, it’s going to be very handy. From here pretty much anything is possible. Now I’ve got it to send me a text message when it makes a call, so even if I’m not in the booth I’ll get the call wherever I am (except for the places calls, where I should already be in the booth). At the end of the script it checks to see if all the calls are marked as “1” and if so, it ends the timer script.

I can’t wait to start using this tomorrow!

I’m so excited I made a movie demonstrating how it works. I suggest watching it at Youtube where it’s in higher resolution.


No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment