8 Replies Latest reply on Apr 25, 2012 2:36 PM by philmodjunk

    OnTimer scripts interrupt work in Manage Scripts

    Dillik

      Summary

      OnTimer scripts interrupt work in Manage Scripts

      Product

      FileMaker Pro

      Version

      FMP 12.0v1 (also 11v4)

      Operating system version

      OS X 10.6.8

      Description of the issue

      If I'm trying to do any work in Manage Scripts when an OnTimer script runs in an open window (in any file, not just the current one), the running of the script can interfere with what I'm trying to do.  In FMP11, the OnTimer script seems to deselect the script window I'm working on.  In FMP12, the script window isn't deselected, but it still interrupts me in at least two other ways:

      * If I was trying to retype a script name, the OnTimer script causes the script name to be fully highlighted in the middle of my typing (thus, I overtype whatever was there).

      * If I had a script step selected in the left pane and was trying to type the name of another step to jump to in the list, FM loses track of what I was typing.  (Example: Say I'm trying to jump to the "Commit Records" step by typing "commit."  If the OnTimer script runs after I've typed "co," it'll jump me down to the first "m" step it finds when I continue to "mmit.")

      Steps to reproduce the problem

      For demonstration purposes, run an Install OnTimer script step with a timer interval of 0.5 seconds (obviously the OnTimer script it's installing should be one that completes quickly).  Then in Manage Scripts, try to type or retype a script's name.  Also try to jump to a command of your choice in the left pane, such as "Commit Records."  It's essentially impossible in FMP11 but still extremely difficult in FMP12.

      Expected result

      Ideally, an OnTimer script (specifically, one that performs a background task) shouldn't alter the state of the Manage Scripts dialog in any way.

      Workaround

      Before working on a script in Manage Scripts, deactivate active OnTimer scripts (especially frequent ones) in all open windows for all open files.

        • 1. Re: OnTimer scripts interrupt work in Manage Scripts
          iDEViate

          I can reproduce the same issue. I could see where that would be quite annoying if you had a ton of onTimers going.

          • 2. Re: OnTimer scripts interrupt work in Manage Scripts
            TSGal

            Dillik and iDEViate:

            Thank you for your posts.

            Going into Manage Scripts will not deactivate any OnTimer active steps.  This is by design.  If you have an OnTimer script active where you want to import data at a specified interval, the script will not deactivate unless the Install OnTimer Script script step is deactivated (no script name specified).  

            I recommend that you enter this suggestion into our Feature Requests database at:

            http://www.filemaker.com/company/contact/feature_request.html

            The entries into this web form are monitored and read by Development and Product Management where the suggestions are then discussed and considered for future versions.  There are a couple of questions on the web form that only you can answer.  Otherwise, I would copy the post and paste it into the web form myself.

            TSGal
            FileMaker, Inc.

            • 3. Re: OnTimer scripts interrupt work in Manage Scripts
              Dillik

              Thanks for the reply, TSGal, but I neither want nor expect FileMaker to stop running OnTimer scripts while Manage Scripts is open; I realize that Manage Scripts is meant not to be a modal dialog anymore.  My problem is that the functionality of Manage Scripts is interrupted whenever an OnTimer script runs.  The solution that I seek isn't for OnTimer scripts to stop; it's that Manage Scripts shouldn't be interrupted.

              Now, yes, arguably a good feature request would be something along the lines of being able to suppress OnTimer scripts in the same way Advanced now lets you suppress script triggers.  But regardless, the behavior of Manage Scripts here is a major nuisance.

              • 4. Re: OnTimer scripts interrupt work in Manage Scripts
                TSGal

                Dillik:

                Although I see your point, OnTimer is going to take precedence.  That is, it will interrupt whatever you were doing to make sure the script runs.  I still recommend you enter this into the Feature Requests web form so that it gets the proper attention.

                TSGal
                FileMaker, Inc.

                • 5. Re: OnTimer scripts interrupt work in Manage Scripts
                  Dillik

                  It's just a shame that "take precedence" has to act like a blow to the head to the Manage Scripts window.  But I've submitted it where you suggested; thank you for the reply.

                  • 6. Re: OnTimer scripts interrupt work in Manage Scripts
                    philmodjunk

                    TsGal, Why should OnTimer interrupt a user's interaction with another window? I forsee major poblems trying to use ONtimer script with this change in behavior.

                    If the user is typing data into a normal FileMaker window and an OnTimer script starts up, should this affect the focus in the window and field where they are entering/editing data? Does it? If it does, this is very undesirable behavior that renders OnTimer pretty useless. If it does not, then why don't we see the same for the script manager?

                    • 7. Re: OnTimer scripts interrupt work in Manage Scripts
                      TSGal

                      PhilModJunk:

                      It depends on the action of the OnTimer script.  For example, if the OnTimer script adds a new record to the same table you are entering data, then the new record is added and the focus will be moved from the record you were editing to the newly added record.

                      When I'm in Manage Scripts, I do see the OnTimer execute, but not switch out of Manage Scripts.  In addition, script steps that I'm editing (like Find/Replace), will pause the OnTimer script until I click OK.

                      With that said, I'm able to replicate the issue reported by Dillik.  The OnTimer script step will affect the typeahead search for a script command.  That is, to quickly scroll down to the "Commit Records/Requests" script step, I would type "Com".  If the OnTimer script kicks off between the "o" and "m", then the typeahead search is reset and "m" is used, and "Modify Last Find" script step is highlighted.

                      On Windows, it reacts differently, as the focus moves out of the Manage Scripts window and back to the database window.  Therefore, if the OnTimer script executes a new record, then the typeahead would enter information into the new record.

                      TSGal
                      FileMaker, Inc. 

                      • 8. Re: OnTimer scripts interrupt work in Manage Scripts
                        philmodjunk

                        Your report omits a detail:

                        * If I was trying to retype a script name, the OnTimer script causes the script name to be fully highlighted in the middle of my typing (thus, I overtype whatever was there).

                        However we choose to describe the details. Is this really "as designed" behavior?

                        Especially:

                        Therefore, if the OnTimer script executes a new record, then the typeahead would enter information into the new record.

                        Ouch!!!