September 28, 20178 yr Hello The following AppleScript is in a opening "Perform AppleScript" step in my database. In Filemaker Pro 13 this script set the Filemaker Pro field without out a problem. After upgrading to Filemaker Pro 16, the AppleScript no longer sets the Filemaker Pro Field Anyone have any ideas why? here is the AppleScript: --Make sure QuickTime exists; could be used to find any program if (do shell script "ls /Applications") contains "QuickTime Player" then --send information to FileMaker so opening script can set voicenotes properly tell application "FileMaker Pro Advanced" tell table "Preferences" tell record 1 set cell "ToBurnSound" to "QuickTime Player" end tell end tell end tell end if
September 28, 20178 yr 4 minutes ago, kgasman said: After upgrading to Filemaker Pro 16, the AppleScript no longer sets the Filemaker Pro Field Anyone have any ideas why? Because of FMP 16 enhanced security. See the first one of "Tips on usage" here: http://www.filemaker.com/help/16/fmp/en/index.html#page/FMP_Help/perform-applescript-os-x.html
September 28, 20178 yr Hi kgasman, I posted an example of where FileMaker has changed this, - here https://fmforums.com/topic/101881-using-applescript-to-open-a-scriptwindow/?tab=comments#comment-463843
September 29, 20178 yr Author Thank you I did set the privileges as you suggested and the AppleScript still does not set the Field... very strange
February 5, 20187 yr Author From a thread in Filemaker Community: Just as a follow-up to document things for future readers of this thread: As HOnza noted, the techniques described earlier in the thread require that fmextscriptaccess be turned on for the file in question when using FileMaker 16 (File > Manage > Security, grant extended privileges to selected users). As I found out (and confirmed through implementation) in another thread, you may omit the 'tell Application "FileMaker Advanced"' tell block and just use the commands directly, since you are operating in the FileMaker context if your AppleScript is being run within FileMaker. This also avoids the problem where you don't know whether users will be running Pro or Advanced. So you can simplify TSuki's AppleScript even more: Tell application "Finder" set cap to get capacity of startup disk end tell set cell "Field1" of current record to cap It turns out if I modified my script to if (do shell script "ls /Applications") contains "QuickTime Player" then Set A to "QuickTime Player" end if set cell "ToBurnSound" to A this works perfectly even if I don't set privileges or use a Tell command
Create an account or sign in to comment