Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 8281 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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???

Posted

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.

Posted

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

Posted

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!

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.