We have an internal system built in Filemaker Pro 12. We have a script that will combine two files together to make a PDF. Then our system calls up the below applescript to convert that PDF into a Jpeg. We get the error: Expected end of line etc. but found identifier.
I have found several posts, but I am not able to get an answer from those posts that solve my issue. FYI... The ftp site below was changed on purpose, it is correct in our system. Any help would be greatly appreciated, let me know if you have any questions.
Unstored, from SnDesign to Same Designs, =
"set theFile to alias \"" & Substitute(Right(Get(DesktopPath);Length(Get
(DesktopPath))-1);"/";":") & "PDFTemplates:" & TemplateNamePDF & "\" "&
¶ &
"tell application \"Adobe Photoshop CS4\" "& ¶ &
"activate" & "¶" &
"open theFile as PDF with options {resolution:150, use antialias:
true}" & ¶ &
"set docRef to the current document" & ¶ &
"tell docRef" & ¶ &
"resize image width pixels 1298 height pixels 1696
resolution 150 resample method bicubic" & ¶ &
"save in \"" & Substitute(Right(Get(DesktopPath);Length
(Get(DesktopPath))-1);"/";":") & "PDFTemplates:" & TemplateNamePDF &
"\"" & " as JPEG with options {quality:6} appending lowercase extension with
copying" & ¶ & "end tell" & ¶ &
"close current document without saving" & ¶ &
"end tell" & ¶ &
"set theFile to alias \"" & Substitute(Right(Get(DesktopPath);Length(Get
(DesktopPath))-1);"/";":") & "PDFTemplates:" & TemplateNameJPG & "\" " &
¶ &
"tell application \"Finder\" " & ¶ &
"duplicate file theFile to \"RETAIL:" & Category & "\"" & " with
replacing" & ¶ &
"duplicate file theFile to \"Mac Volume:RETAIL CURRENT:
_JPEGS2File\" with replacing" & ¶ &
"end tell" & ¶ &
"tell current application" & ¶ &
"do shell script \"usr/bin/curl -T " & Right(Get(DesktopPath);Length
(Get(DesktopPath))-13) & "PDFTemplates/" & Substitute
(TemplateNameJPG;["(";"'('"] ;[")";"')'"]) & " ftp: //Domain Name/\" " & ¶ &
"end tell" & ¶ &
"tell application \"Finder\" " & ¶ &
"delete file theFile" & ¶ &
"end tell" & ¶ &
"set theFile to alias \"" & Substitute(Right(Get(DesktopPath);Length(Get
(DesktopPath))-1);"/";":") & "PDFTemplates:" & TemplateNamePDF & "\" "&
¶ &
"tell application \"Finder\" " & ¶ &
"duplicate file theFile to \"" & Substitute
(ApplescriptArtFolderPDFPathCalc;"/";":") & "\" " & " with replacing" & ¶ &
"end tell" & ¶ &
"tell application \"Filemaker Pro\"" & ¶ &
"activate" & ¶ &
"end tell"