3 Replies Latest reply on Oct 27, 2014 7:58 AM by TSGal

    Modal window blocks an applescript

    l_allen_poole

      Summary

      Modal window blocks an applescript

      Product

      FileMaker Pro

      Version

      13.0 v3

      Operating system version

      OS X 10.10

      Description of the issue

      Applescript executed by a script triggered from a modal window returns error -1712, fails. Same Applescript executed by a script triggered from a normal "Document" window works fine.

      Steps to reproduce the problem

      Call a script that runs an Applescript from a FM modal window. Applescript has some interaction with FileMaker, such as:

      set lookup_value to get data cell "LDAP_LOOKUP_VALUE"
      set shell_script to ...     
      set ldap_result to do shell script shell_script as text
      set data cell "LDAP_RESULT" to ldap_result

      Expected result

      Applescript is able to do its thing.

      Actual result

      Applescript is thwarted by the modal window, and times out.

      Exact text of any error message(s) that appear

      Error -1712 returned by FileMaker Get ( lasterror )

      Workaround

      Close the modal window and run the scripted process in the context of a non-modal window.

        • 1. Re: Modal window blocks an applescript
          TSGal

          L. Allen Poole:

          Thank you for your post.

          This is expected behavior, as Apple events are not going to continue while a modal dialog is displayed.

          TSGal
          FileMaker, Inc.

          • 2. Re: Modal window blocks an applescript
            l_allen_poole

            Maybe you can improve your documentation, then, since it only says

            "Document window... similar to the behavior of a window when a running script is paused."

            Can you tell us what is and is not possible when a modal dialog window is open?

            Thanks,
            Allen

            • 3. Re: Modal window blocks an applescript
              TSGal

              L. Allen Poole:

              FileMaker has three different types of windows: Document, Floating, and Dialog.  Dialog is the only window that is modal.  Page 1080 of the FileMaker Pro Help talks about the these three window types.

              http://fmhelp.filemaker.com/docs/13/en/fmp13_help.pdf

              Specifically, "Dialog windows are modal. They appear in the foreground and can’t be minimized. Users cannot activate an open document window before closing an open dialog window."

              Your partial reference on page 1224 is a bit misleading.  For the "Dialog window" description, it says "A document window in a modal state. Its behavior is similar to the behavior of a window when a running script is paused. You can create and customize a dialog window using the New Window script step."  That is, a dialog window is modal and is similar to the behavior of a window when a running script is paused.  That is, if a Dialog window is active, everything else is paused.  Attention is only on the window.  You cannot select another window until that window is closed.

              TSGal
              FileMaker, Inc.

              1 of 1 people found this helpful