March 22, 200223 yr Hi there. I'm building a real-time sign in database with a web interface. I know that FM timestamps things when you want it to, but what I'm looking to do is have a real-time (actually counting the minets and seconds) clock that alerts me when 20 minuets have passed. I know it's already possible w/ javascript, but I need the event noted in the database after 20 minuets. Anyone have any ideas??
March 23, 200223 yr Author I never got the real time clock thingie, but I did get the timed event to work with a timestamp. I'm documenting it if there is anyone who would like to know how I did it. First of all, I have three fields: timestart(time field), elapsed_time(calculation field) and times_up(calculation field). Timestart is just a field that stamps the time that starts a tutoring session with whatever time they start. elapsed_time was a little more tricky as I was using the status(currenttime) function. So the calculation looked like this: status(currenttime) - timestart and the times_up field validates the time after 20 minuets have elapsed. So it looks like this: If(elapsed_time >= Time( 00 , 20 , 00 ),"Times UP!","") I hope I helped anyone who is working on anything similar or having problems doing the same thing. I'd like to hear from anyone who's built a real working clock with FM. Thanks!
March 26, 200223 yr First, set up the elapsed_time field storage not to store results. Then, you have to click in the field. OR... Another way is to create a script that: Pauses for 20 minutes Puts up an alert (perhaps "Show Message"?) The problem here is if you run other scripts during the 20-minute time period. Then you're pretty much hosed.
March 28, 200223 yr quote: Originally posted by danjacoby: First, set up the elapsed_time field storage not to store results. Then, you have to click in the field. OR... Another way is to create a script that: Pauses for 20 minutes Puts up an alert (perhaps "Show Message"?) The problem here is if you run other scripts during the 20-minute time period. Then you're pretty much hosed. There's no problems with other script running, off course if you don't have an other script that contain Pause for ever step, just select option "resume current script" to buttons that trigger them. If you select script from menu the problem is not arrising And of course you will need to modify a little bit the script that Dan gave you to something like this: Script "Start" set field [startTime, StatusCurrentTime] performScript "Wait" script "Wait" setField [waitFor,endTime-StatusCurenTime] PauseResumeScript[value from field waitFor] If [statusCurrentTime<endTime] PerformScript "Wait" else ShowMessage"Time is up!" end if where startTime,waitFor are global time fields endTime is calculation startTime+20minutes or whatever HTH Dj
March 29, 200223 yr You could call either an ActiveX script or an AppleScript. These scripts can keep time then call back to FM when the time is up! All the best. Garry
Create an account or sign in to comment