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

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

Recommended Posts

Posted

Hi gang,

I wanted to see if there are any handy tricks out there to solve a problem I am having.

I have a file called "FileA" which has an important script that runs every 10 seconds to update an activity list.

I want the script to HALT if the active file IS NOT "FileA" and then RE-ACTIVATE when the script has been halted and file "FileA" has been re-activated.

I realize I can script the HALT/ACTIVATE this interval script via navigation button, but my problem is the users have multiple windows up at a time and just click windows when needed.

What would be nice is that scripts would run independent in their own file (in the background) so that if I was working or running another script in another file, all would be well. For example, if I click and activate a file called "FileB" and turned on script debugger, the interval script from FileA would not trigger until I re-activate FileA.

I'm gonna keep trying to figure this out, but if someone has the answer from past experiences, please do share.

Thanks all.

Posted

Rick - not the active FILE ;-)

Posted

Files are only active through their windows.... so it's not clear what you mean by the disctinction.  Do you mean - as Rick asked - if the frontmost window at the time is not from FileA?

This kind of thing is what server-side schedules are for.  That way it affects no users' session and you don't have to worry about the intricacies of the OnTimer event.

Posted

Actually, Wim, this is why I am asking. Sorry if my post is confusing.

In File A (in one window), I have started an OnTimer Event.

If I move from that file and I start working in another file (in another window), if I launch my script debugger, the OnTimer script runs from File A runs even though I am in a different FILE. Annoying.

Just wondering if there is a way to disable that script when the File A is not the file I am working in without having to run a script to stop the OnTimer Event.

Thanks!

Posted

Nope, the whole point of an OnTimer is that it is attached to a window and remains there until you close the window or remove the OnTimer.

Posted

I wonder if you could add some logic to the OnTimer script to exit if it's not the front window.

This topic is 3436 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.