See the screen shot for the script that does NOT work
The script should work and I frequently use this method to halt the current timer.
Do you have more than one window open? Each window can have its own timer.
I have many screens and files open. Is this a possible bug?
I just tried it again. If I enable both script steps, it doesn't run at all. If I disable the second (stop) it keeps repeating.
I'm not sure what You want... why this timer after importing records?
- The first step activates the timer
- The second step clears the timer
To stop a timer that ist running, just define another timer (without script/interval) - it will stop the existin one. There is only one timer running - per window (use a second script to stop the timer). You can also close the window in that the timer was started - it will stop that timer as well.
hmm... since we're in the 'FileMaker Server'-section...
-> a server script can't be activated using an 'on timer'-script-step. You have to create a script in a FileMaker file hosted on the server, then create a schedule that runs this script
The server will execute the script in an intervall defined in the schedule. But You need a FM Server running..
Thanks for the response. The Import is to populate a few very important fields from a USB stick, where the information needs to reside. I only want it exposed to the possibility of hacking for the 10 minutes it should take my user to use it, then I want to ex[port it back to the USB stick and taken out of the machine. The OnTimer script step is helpful to keep my user from forgetting it and leaving it exposed needlessly. The problem is that it isn't working as written, what could I have wrong?
BTW, this post is in the FileMaker Server Forum instead of The FM PRO Forum. So it doesn't get seen nearly as often nor by nearly as many people as it would if posted in the correct area.
I would look for something else performing your script when you don't expect it to. as I see no way that install onTimerScript could be the culprit here for just this one script. But then we can't see the "Protect Data" script so we don't know what it does either. If Protect Data includes a Perform Script that performs the Restore Data script, then you have set up an infinite loop where each script infinitely calls the other script.
That said, I suggest a script that avoids install OnTimer alltogether:
Use Allow User Abort to keep the user from cancelling this script.
Then, instead of using Install OnTimerScript, just use Pause/Resume Script to pause this script for a specified, brief period of time.
If the pause causes problems, you can fix the original method by putting the "halt the timer" script step at the end of the script performed by this Install OnTimer Script step. So script A sets the timer going and performs script B when the timer runs down. Script B then halts the timer so that it is not peformed a second time.