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

This topic is 6920 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

i am trying to automate creating and saving a pdf file, switching from printer to apple internal modem and sending a fax to each recipient on my list. Creating the pdf is no problem but I cant get filemaker to accept my calculated Apple script. I know the script syntax works Ok as i can run it from terminal. When i paste the script into filemaker as a scipt this works, however when i try and calulate the script so i can change the recipients fax no it generates a -2740 error. List below is the working applescript and the calculation. I think the problem is centred round haveing to use quote in the calc.

Applescript

"do shell script lp -d Internal_Modem -o phone=01539552186~/Desktop/1.pdf"

Calculated Applescipt

"do shell script" & " lp -d Internal_Modem -o phone=" & faxtest::Fax No & " ~/Desktop/1.pdf"

Posted

What Søren means is escape the quotes you want to appear in the result, ie., after "do shell script" (which are not correct in your AppleScript example).

"do shell script "lp -d Internal_Modem -o phone=" & faxtest::Fax No & " ~/Desktop/1.pdf""

produces

do shell script "lp -d Internal_Modem -o phone=6196921539 ~/Desktop/1.pdf"

This topic is 6920 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 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.