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

Recommended Posts

  • Newbies
Posted

Hello. Sorry – crap at scripting. I have an FMP container field pointing to an mp4 file – well, a stack of them. I have a field that contains the path to each file. I have a button to open the file in its native app quite successfully. I would like a script that instead of opening the file simply reveals it in the finder. I've run the gamut of bad (AppleScript) syntax through damaged libraries and I'm sweating. Any help appreciated. Thanks a lot!

Typical path:

m3 ssd:Users:xxxxxxxx:Movies:music vids:Wild Thing.mp4

Posted

Assuming the path field holds a valid macOS path to the file, try either one of these:

• Calculated AppleScript:

"tell application \"Finder\"¶
activate¶
reveal file \"" & YourTable::Pathfield & "\"¶
end tell"

• Native AppleScript:

set myFile to cell "Pathfield" of current record
tell application "Finder"
activate
reveal file myFile 
end tell 

I believe this variant requires enabling the fmextscriptaccess extended privilege.

 

  • Like 1
  • Newbies
Posted

Oh. That's marvellous – thanks so much!! I was inches from it but missing those quotes/slash bits in the calc version.

Will be playing tonight. Really appreciate it – thanks a lot!

/j

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.