4 Replies Latest reply on Mar 6, 2013 10:36 AM by Mike_Mitchell

    Problems with Freeze Window


      Hello Everyone,


      I'm having some issues with one of my FMP12 solutions and looking for some help. In the beginning of each of my scripts, I put in the Freeze Window script step so that the user's screen doesn't jump around while the script is running. However, in one of my solutions, the screen has started turning white while my script is running. I was curious if anyone is aware of any script steps that ignore the Freeze Window command. I had also considered that it could be an issue of calling a script within my script, but "re-freezing" the window at the same layout in my second script doesn't seem to change anything.


      If anyone has any thoughts, I'd appreciate it.

        • 1. Re: Problems with Freeze Window

          Daniel -


          Freeze Window doesn't mean what I think you think it means. (With all appropriate apologies to Inigo Montoya.)   


          "Freeze Window", in this case, means "don't refresh the window for normal events that would cause the window to refresh". It doesn't mean "hold the image that's on the screen right now until the end of the script". It's typically used to prevent screen flicker and to improve performance in scripts that use loops, for example.


          However, if something happens during the script that causes the image to be erased (such as another event in another application), then the screen will not be refreshed (because you told it not to), and it will be "whited out" until such time as the operation is terminated, or another event occurs that overrides the Freeze Window, such as a Pause / Resume step, jumping into another script - I think - or an explicit Refresh Window.





          • 2. Re: Problems with Freeze Window

            To expand that a bit, the way I handle scripting is that I open a new window in the background in -2000 pixels far from me (aka negative space) and let the script(s) run there. When finished, close the window. The user will only see the front window and a slight flicker when the windows switch. 


            Best regards,


            agnes b. riley

            filemaker and web development




            FileMaker Certified in 10 and 11

            Member, FileMaker Business Alliance

            T: 877 917-9079 . C: 917-660-7221

            1 of 1 people found this helpful
            • 3. Re: Problems with Freeze Window

              Thanks for that great tip - My windows are now behaving how I wanted them to.

              • 4. Re: Problems with Freeze Window

                Strictly speaking, Agnes's solution is better in many circumstances. It preserves the user's context and found set and avoids some of the pitfalls of switching layouts around in your user's window (like having to trap layout Script Triggers too much). I use it myself more often than allowing scripts to run in the current window.