1 Reply Latest reply on Apr 30, 2010 11:50 AM by TSGal

    AppleScript Do Menu command issues with FileMaker Pro 10-11

    lhoong

      Summary

      AppleScript Do Menu command issues with FileMaker Pro 10-11

      Description of the issue

      It appears that the Do Menu command via AppleScript no longer works when included in a Perform AppleScript script step. For example, the following script fails as a FileMaker script step:do menu menu item "Formatting Bar" of menu "View"giving unknown error -10000.However, it can be run successfully from the Apple Script Editor as:tell application "FileMaker Pro Advanced"do menu menu item "Formatting Bar" of menu "View"end tell In addition, attempts at workarounds involving UI scripting were problematic. The following script:tell application "System Events"  tell application process "FileMaker Pro Advanced" to activate  perform action "AXPress" of menu item "Formatting Bar" of menu 1 of menu bar item "View" of menu bar 1 of application process "FileMaker Pro Advanced"end tellfails and results in grayed out menu items when run as a Perform AppleScript script step; menu items returned to normal after about 30 seconds. When the same script is run from the Apple Script Editor, nothing appears to happen until the FileMaker menu bar is clicked, at which time, the Formatting Bar is displayed as desired.Some of the above behavior is described by Bill Doerrfeld and other users in a FileMaker Tech Talk thread:http://techtalk.filemaker.com/?14@@.59bfe308#22 My system: Mac OS X 10.5.8; FileMaker Pro Advanced 11v1. The behavior is also observed in FMPA 10v3.I'm hoping the above can be fixed sooner rather than later.Lee Hoong.=================Binary Assist220 Gaines Oak WaySuwanee, GA 30024Voice: (678) 313-5604Internet: lhoong@binaryassist.comWebsite: www.binaryassist.comFileMaker Certified Developer

        • 1. Re: AppleScript Do Menu command issues with FileMaker Pro 10-11
          TSGal

          Lee Hoong:

           

          Thank you for your post and for the link to TechTalk.

           

          Since your post here, I see you found a workaround that is posted on TechTalk, and I'm posting it here for others to see.

           

           

          1. Create a script (e.g. "Restore Std FM Menus"): 

          Restore Std FM Menus 
              Install Menu Set [ “[Standard FileMaker Menus]” ] 

          2. In the script ("Toggle Formatting Bar") with the Perform AppleScript step, use the following AppleScript: 

          Toggle Formatting Bar 
          Perform AppleScript [ Native AppleScript: tell application "System Events" 
          tell application process "FileMaker Pro Advanced" 
          perform action "AXPress" of menu item "Formatting Bar" of menu 1 of menu bar item "View" of menu bar 1 
          end tell 
          end tell 
          do script FileMaker script "Restore Std FM Menus" 
           ] 

          This seems to work reliably for me, but there appears to be a slight delay before the Formatting Bar is actually displayed/hidden. 

           

          ------------------

           

          The best place to make product suggestions is our Feature Requests web form at:

           

          http://www.filemaker.com/company/contact/feature_request.html

           

          Although I could easily copy your post and paste them into the web form, there are additional questions asked that only you can answer.  The entries into this web form are monitored and read by members of Development and Product Management, so you will definitely have the correct listening audience.  Also, we like to know what our customers are doing with our products, so receiving a post from a customer carries more weight than a request from a Support Technician.  In addition, from past observations, I have noticed that Development and Product Management tend to pay closer attention to suggestions that have real-life examples.  That is, don't just say "Add this feature".  Explain what you are trying to do, what barrier you are encountering, how this will help you/client/etc., and what you would like to see.

           

          Please feel free to forward this information to TechTalk so that Bill Doerrfeld and all others on that thread have this information.

           

          TSGal

          FileMaker, Inc.