2 Replies Latest reply on Sep 24, 2013 9:47 AM by coherentkris

    Install On Timer details

    coherentkris

      In FMP help... "After the specified interval has passed, the next time the application is idle, run the script"...

      so here is what i think is happening in FMP pseudo code...

       

      install timer (script "a"; 10)

      set var interval = 10

      Loop

      set variable interval = interval - 1

      Exit Loop if interval = 0

      End Loop

      Loop

      Exit Loop if script can be executed

      End Loop

       

      fire script "a"

       

      What can cause delay in the second loop?

       

      TIA,

       

      Kris

        • 1. Re: Install On Timer details
          DavidJondreau

          It's really unclear what your question is or what your code is trying to accomplish. Are you looking to complete a certain task or just understand a function? I think it's the latter, but I'm not sure. FileMaker's script steps don't actually run as scripts. FileMaker isn't written in FileMaker.

           

          "if script can be executed" is not a function. And the help isn't completely accurate. I'd say the OnTimer script gets put on the script stack after its timer runs out. That's what the Help means by "idle". An onTimer script won't interrupt a running script, or jump into the script stack. It'll wait it's turn.

          1 of 1 people found this helpful
          • 2. Re: Install On Timer details
            coherentkris

            David,

            The "code" was simply my attempt to describe what I think is going on in Filemaker terms so that my question would be easier to understand.

             

            Understanding the function was my goal and your last line explains alot.

             

            Can assume that the only thing that would cause a delay is another running script?