September 21, 200421 yr 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
September 22, 200421 yr 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.
September 27, 200421 yr Author 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
September 27, 200421 yr 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
Create an account or sign in to comment