5 Replies Latest reply on Mar 26, 2012 7:50 PM by RedL

    Floating window with OnTimer



      Floating window with OnTimer


      I am creating a floating windows.  It works.  I have button to halt the script.

      I would like to set a timer to close(halt) it automatically when user does not click it.  I insall OnTimer when floating window is created.  But, it looks like the OnTimer cannot be called when the floating window is in endless pause situation.

      Below is my script to create floating window.

      Go to Layout [ “TimeInternvalUI” (GlobalParameter) ]

      Install OnTimer Script [ “Sys_TimerUISecondTrigger”; Interval: 1 ] 


      Pause/Resume Script [ Indefinitely ]

      End Loop

      How can I have a OnTimer script in the Floating window?

        • 1. Re: Floating window with OnTimer

          I would guess that you want the floating window to simulate "modal" behavior by pauing in an infinite loop.

          In your  “Sys_TimerUISecondTrigger” script, include halt script as the final step and I think it will close your window for you.

          • 2. Re: Floating window with OnTimer

            Well,  let me describe more detail.

            1. I have a modal window which has OK button.  The window will be closed when user click the OK button.   OK button scrip has a halt scrip.  It works when user click OK button.
            2. I attach OnTimer script when the modal window is created.
            3. When the OnTimer script is trigged I will close the window and halt the script.
            4. But, looks like the OnTimer script is not trigged.  Fyi, I have Show Custom Dialog message and it never shows up.
            5. I disable the endless loop on the Window setup script and the On Timer script works.
            • 3. Re: Floating window with OnTimer

              Does install OnTimer have to install this timer on the new window? Could it install it on the original "parent" window instead? (This depends on whether you only need one timer or not.)

              • 4. Re: Floating window with OnTimer

                Hmmm, just ran a test. the pause does seem to keep all timers from working.

                You might try this approach:

                Go to Layout [ “TimeInternvalUI” (GlobalParameter) ]

                Pause/Resume Script [ 1 second ]

                Close Window

                • 5. Re: Floating window with OnTimer

                  Thanks.  It works.  I can ue timer to unload the modal window.