Kittrick Posted March 22, 2002 Posted March 22, 2002 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??
Kittrick Posted March 23, 2002 Author Posted March 23, 2002 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!
danjacoby Posted March 26, 2002 Posted March 26, 2002 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.
djgogi Posted March 28, 2002 Posted March 28, 2002 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
Garry Claridge Posted March 29, 2002 Posted March 29, 2002 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
Recommended Posts
This topic is 8275 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now