2 Replies Latest reply on Jan 28, 2016 9:02 AM by steveromig

    System Events

    rtolliver

      Can FileMake Pro system events be used to trigger scripts?

       

      I have two cases where I'd like to have a script run if the event changes, the two events are;

      • Exiting Layout mode
      • Hide Status Toolbar

       

      I've found two functions but I'm not quite sure how to use them.

      • Get (WindowMode)
      • Get (StatusAreaState)
        • 1. Re: System Events
          Steve Wright

          For the first, there is a Layout level script trigger "On Mode Enter"

          This will run a script when you switch from Layout to Browse mode (or any other mode selected).

           

          For the second, you could try the layout level script trigger  "OnLayoutSizeChange"  (I briefly tried on Windows and it worked)

          Combine that with checking the status area state within the script you choose to determine if the toolbar is visible or not.

           

          I am unsure if it will work on Mac though, I don't have mine to hand to try it and can't recall if the layout size changes when the toolbar is toggled.

          • 2. Re: System Events
            steveromig

            Can FileMake Pro system events be used to trigger scripts?

             

            I have two cases where I'd like to have a script run if the event changes, the two events are;

            • Exiting Layout mode
            • Hide Status Toolbar

             

            I've found two functions but I'm not quite sure how to use them.

            • Get (WindowMode)
            • Get (StatusAreaState)

             

            There is not a script trigger to detect when you leave Layout mode per se, but you could use the OnModeEnter script trigger to detect when you enter Browse (or Find or Preview) either manually or via a script.

             

            There also isn't a script trigger to detect when the Status Toolbar has been closed / hidden, but the OnLayoutSizeChange script  trigger will detect when the layout size changes based on the Status Toolbar closing and you can take action accordingly.

             

            While you may very well incorporate the two functions mentioned above, they are not necessary to do what you are trying to do

             

            Steve Romig

            FileMaker, Inc.