Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 2483 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

Thank you

I did set the privileges as you suggested and the AppleScript still does not set the Field...

very strange

  • 4 months later...
Posted

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 

 

 

 

This topic is 2483 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.