December 12, 200520 yr 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"
December 12, 200520 yr 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"
Create an account or sign in to comment