Newbies justcomingdear Posted January 20 Newbies Posted January 20 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
comment Posted January 20 Posted January 20 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. 1
Newbies justcomingdear Posted January 20 Author Newbies Posted January 20 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now