Jeff Bills Posted September 21, 2004 Posted September 21, 2004 i have a filepath to a pdf document that imported with this information: file:// G4/Users/jeffbill/Documents/tutorials/Page 4 - Channels Masking.pdf into a field called "path" How do I automate Filemaker with apple events or applescript to launch the file at the end of this path? I'm new to applescript and apple events -thanks -J
HazMatt Posted September 22, 2004 Posted September 22, 2004 Make a new text calculation field called "path_applescript_calc": "tell application ""Finder"" activate if file """ & path & """ exists then select file """ & path & """ open selection else beep display dialog ""There is no PDF for this file."" with icon 1 buttons (""OK"") default button 1 end if end tell" The triple quote marks pass a single quote mark to the AppleScript. The paragraph markers at the end of each line are to keep the calculation result pretty. It's indented too, but it didn't show up in my post.
Jeff Bills Posted September 27, 2004 Author Posted September 27, 2004 Matt, Do I type everything from "tell . . . end tell" AS-IS into the "path_applescript_calc" field along with appropriate indents? I'm dumber than a skunk on this issue, go easy on me
bruceR Posted September 27, 2004 Posted September 27, 2004 No. Do NOT use that method. And the post has several errors. Creating fields for applescript is poor practice. Use the perform applescript method and put the script there. copy cell "Path" of current record to filePath Tell app "Finder" try open file filePath on error display dialog ""There is no PDF for this file."" with icon 1 buttons {"OK"} default button 1 end try end tell
Recommended Posts
This topic is 7316 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 accountSign in
Already have an account? Sign in here.
Sign In Now