When running this applescript from filemaker i get these errors: Expected end of line but found identifier., Unknown Error: -2741.
The calculated applescript looks like this:
"tell application "Finder"¶ set filestart to "" & $path & "" as string¶ set fileend to ""& $ftp & "" as string¶end tell¶tell application "Adobe Photoshop CS6"¶
open file filestart showing dialogs never¶
set myOptions to {class:Photoshop save options, embed color profile:false, save spot colors:false, save alpha channels:false, save annotations:false, save layers:false}¶
set openimg to current document¶
resize image openimg resolution 150.0 resample method bicubic¶
set myOptions to {class:Photoshop save options, embed color profile:false, save spot colors:true, save alpha channels:false, save annotations:false, save layers:true}¶
save current document in file fileend as Photoshop format with options myOptions appending no extension without copying¶
close openimg saving no¶end tell"
When running the script to a field with the $path and $ftp it looks like this:
tell application "Finder"
set filestart to "billeder:1000:1000-italy.psd" as string
set fileend to "ftp:Art:Inger:150dpi" as string
end tell
tell application "Adobe Photoshop CS6"
open file filestart showing dialogs never
set myOptions to {class:Photoshop save options, embed color profile:false, save spot colors:false, save alpha channels:false, save annotations:false, save layers:false}
set openimg to current document
resize image openimg resolution 150.0 resample method bicubic
set myOptions to {class:Photoshop save options, embed color profile:false, save spot colors:true, save alpha channels:false, save annotations:false, save layers:true}
save current document in file fileend as Photoshop format with options myOptions appending no extension without copying
close openimg saving no
end tell
If i copy the above text to the applescript tool, and compile, it works fine.
I have also tried to replace the : with /, but no effect.
Is there anyone who, can see what i'm doing wrong?