9 Replies Latest reply on Jun 29, 2009 6:19 PM by GeoNick

    Killer script

    GeoNick

      Title

      Killer script

      Post

      I have a database (FMP 10) with numerous tables and scripts. I have recently written a script to open a layout with control buttons to access the various tables. While attempting to write a script that placed this window appropriately, I inadvertently left a "Close Window" command at the end of a startup script.

       

      Now when I open the database, the window flashes up for a second and then closes so I cannot access the database or the scripts to fix the problem.

       

      Is there any way to disable this "killer" script?

       

      TIA

        • 1. Re: Killer script
          TSGal

          GeoNick:

           

          Thank you for your post.

           

          If you have FileMaker Pro 10 Advanced, you can activate the Script Debugger and cancel the script.  However, it sounds like you only have FileMaker Pro 10.  I have sent you a private message (top of this page - right side - X Messages) with instructions where to send your file.  I will deactivate the script and return it to you.

           

          TSGal

          FileMaker, Inc. 

          • 2. Re: Killer script
            GeoNick
              

            OK, have emailed the errant file.

             

            Hope you can help.

             

            Might be an idea there for future upgrades of FMP10. Some kind of emergency escape command to get out of rogue scripts. (the Esc key did not abort in this case).

            • 3. Re: Killer script
              philmodjunk
                

              Esc, works for Windows. It's option-period for Macs. (I'm pretty sure you know this, but need to be sure.)

               

              I've sometimes been able to interrupt this type of script by holding down the Esc key and keeping it down while opening the file. I haven't tried this with the latest releases of FMP, but it's worth a try.

               

              It won't work if you've disabled user aborts of course...

              • 4. Re: Killer script
                comment_1
                   The escape key might work, provided you didn't turn Allow User Abort off in the script, and if you press it fast enough. Otherwise you can open the file by referencing it in another file, so it opens hidden - then select it from the Windows menu.
                • 5. Re: Killer script
                  GeoNick
                    

                  I am on windows XP SP3.

                   

                  Tried all of the above without success.

                   

                  Even managed to click a button in the brief opening flash that should have launched a new window from a table in the database, but the startup script seems unstoppable!

                  • 6. Re: Killer script
                    philmodjunk
                      

                    Comment said:

                    "Otherwise you can open the file by referencing it in another file, so it opens hidden - then select it from the Windows menu. "

                    I used to rely on that trick when I was using fmp 5.5. Since upgrading to 10, I find that the "on open" script kicks in the instant I bring the hidden window up. I believe you use Mac, while I'm using windows so it may be that the trick still works on Mac machines.

                    • 7. Re: Killer script
                      GeoNick
                        

                      Neat idea.

                       

                      I tried several methods with your suggestion

                       

                      Unfortunately, the file has password access protection and as soon as you try to open hidden, the login dialog appears. When you click OK to login, the script launches and closes the file even though it never had a window open :( 

                      • 8. Re: Killer script
                        comment_1
                          

                        GeoNick wrote:
                        Unfortunately, the file has password access protection and as soon as you try to open hidden, the login dialog appears.

                        You need to create the same account name/password in the "other" file, and log in using this combination.


                        • 9. Re: Killer script
                          GeoNick
                            

                          Alas, that did not help, Window menu does not show the hidden file.

                           

                          Still got the login dialog if I ran a script to open the file in hidden status as well.

                           

                          However, finally cracked it by setting up a relationship to the errant file and then using a script in the new database to run an "external" script in the errant file which (fortunately) was designed to open a window with a layout from the errant file.

                           

                          :)