AnsweredAssumed Answered

Passing an FM variable to Applescript?

Question asked by RickWhitelaw on Jun 6, 2009
Latest reply on Jun 17, 2009 by RickWhitelaw

Title

Passing an FM variable to Applescript?

Post

Hi,

 

I have a script that saves a record as PDF and sets the title to the value of $TITLE. What I'm trying to do is reduce the file size. So . . . I wrote a workflow (and saved it as an application)in Automator that gets the selected file and passes it to the next step, which is a Quartz Filter. This works fine and reduces most PDF files to 1/3 the original size. The only problem is scripting the selection of the saved PDF file. I use a Perform Applescript step, something like "tell application "Finder" to open application Quartz filter". If the PDF file on my desktop is highlighted (selected) manually this works fine. However, it seems that I should be able to precede this script step with another that selects the file by name, which means I need to pass the variable $TITLE to Applescript. I've written hundreds of scripts in FM but this Applescript problem has me stumped. I'm sure it's very simple.

 

RW 

Outcomes