Hi I hope you can help, I've been researching this but I keep hitting a wall.
combineCommand = "/usr/local/bin/gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=" & "\" & Chr(34) & mergedFilePath & "\" & Chr(34) & Replace(pdfFiles, """", "\""")
comboCombo = "do shell script """ & combineCommand & """"
These are my lines of code above,
The comboCombo from the debug print shows this
do shell script "/usr/local/bin/gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=\"/Users/StudioA/Desktop/merged.pdf\" \"/Users/StudioA/Desktop/1.pdf\" \"/Users/StudioA/Desktop/2.pdf\" \"/Users/StudioA/Desktop/3.pdf\" \"/Users/StudioA/Desktop/4.pdf\" \"/Users/StudioA/Desktop/5.pdf\" \"/Users/StudioA/Desktop/6.pdf\" \"/Users/StudioA/Desktop/7.pdf\" \"/Users/StudioA/Desktop/8.pdf\" \"/Users/StudioA/Desktop/9.pdf\" \"/Users/StudioA/Desktop/10.pdf\" \"/Users/StudioA/Desktop/11.pdf\" \"/Users/StudioA/Desktop/12.pdf\""
If you copy and paste to applescript it works perfectly,
But for some reason when I use
MacScript (comboCombo) it throws an error Run time error '5' Invalid procedure call or argument.
AlI can assume is that went it gets passed over to MacScript additional or incorrect syntaxes occur?
Can anyone help please.
combineCommand = "/usr/local/bin/gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=" & "\" & Chr(34) & mergedFilePath & "\" & Chr(34) & Replace(pdfFiles, """", "\""")
comboCombo = "do shell script """ & combineCommand & """"
These are my lines of code above,
The comboCombo from the debug print shows this
do shell script "/usr/local/bin/gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=\"/Users/StudioA/Desktop/merged.pdf\" \"/Users/StudioA/Desktop/1.pdf\" \"/Users/StudioA/Desktop/2.pdf\" \"/Users/StudioA/Desktop/3.pdf\" \"/Users/StudioA/Desktop/4.pdf\" \"/Users/StudioA/Desktop/5.pdf\" \"/Users/StudioA/Desktop/6.pdf\" \"/Users/StudioA/Desktop/7.pdf\" \"/Users/StudioA/Desktop/8.pdf\" \"/Users/StudioA/Desktop/9.pdf\" \"/Users/StudioA/Desktop/10.pdf\" \"/Users/StudioA/Desktop/11.pdf\" \"/Users/StudioA/Desktop/12.pdf\""
If you copy and paste to applescript it works perfectly,
But for some reason when I use
MacScript (comboCombo) it throws an error Run time error '5' Invalid procedure call or argument.
AlI can assume is that went it gets passed over to MacScript additional or incorrect syntaxes occur?
Can anyone help please.