Jump to content

Do Shell script as calc


rick fry
 Share

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

Recommended Posts

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"

Link to comment
Share on other sites

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"

Link to comment
Share on other sites

This topic is 5761 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
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.