Kittrick Posted March 23, 2002 Posted March 23, 2002 I was wondering as part of my attempt to make a real-time filemaker clock to count usage time...how do I view the real time ticking?? I can see the beginning and end of this concept script I have...but I have NO IDEA how to see it as it's counting. Here's my concept script: Set Field["counter", "0"] Loop Set Field["counter","counter+1"] Exit Loop If["counter=50"] End Loop Anyone have any suggestions???
danjacoby Posted March 23, 2002 Posted March 23, 2002 You could create a script: code: Loop SetField [TimeField, Status(CurrentTime)] Pause/Resume ["0:00:01"] End Loop The problem is, it'll interfere with other scripts. A better way to count user time is to create "SignIn", "SignOut" and "TimeOpen" fields, and have the SignIn field set to the current time when you open the file, then the SignOut field set to the current time and set the TimeOpen field to the difference when you close the file. You won't get a realtime readout, but it's usable.
Rigsby Posted March 24, 2002 Posted March 24, 2002 I use a technique for this, but only to test the general speed of scripts. It can help to see what steps are faster or slower. The system uses 3 Global fields TIMESTART & TIMESTOP & TIMETOT, and is simply inserted into a looping script: e.g. START SCRIPT Go to layout “Timer” SetField(TIMESTART) Status(CurrentTime) Loop <Here comes your script> Exit Loop / Or go to next exit after last etc. SetField (TIMESTOP) Status(CurrentTime) SetField (TIMETOT) abs(TIMESTART - TIMESTOP) NB: If you add the last command: SetField (TIMETOT) abs(TIMESTART - TIMESTOP) Into the loop, the seconds will tick away as the script performs, but remember this will slow down your script. Hope this helps a bit Rigsby
Kittrick Posted March 27, 2002 Author Posted March 27, 2002 Thanks you guys for replying to my question and for your help. It's pretty hard to run this, as was stated "it will interfere with other scripts". I have scripts all over the place in my web based sign-in program that run at various times and simultaneously so this idea is too resource intensive. I'll just try a simple script that calculates the time difference between now and when someone clocks in. Afterall, it's on the web and it's static for 5 seconds until it refreshes itself. Thanks again!
Recommended Posts
This topic is 8281 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