I’m trying to write an AppleScript that’ll allow me to batch process a load of Quark documents, print them to a .ps file, and then pass it on to Distiller, and then remove the .ps files.
I’ve managed to get Quark to print an open document to the PS file, and I can script Distiller to convert a .ps file to PDF. However, I don’t know how to string them together. Thing is, Quark prints to a default folder, which is the Quark application folder. Now, how do I move this PS file to the desktop? Can I get the file alias from Quark’s print command? Or how do I manage to get a reference to the file otherwise?
Next up, Distiller creates a .log file that I want to remove along with the .ps file. When I take the “name” of the file, that doesn’t give me the entire path to it, which I believe I need to delete it. I want to take the path of the .ps file into a string, and change the extension to .log and then remove both files into the trash.
Actually, you can easily specify where the PS document gets created. This should also help solve your other issue, since you’ll be specifying the path…
tell application "QuarkXPress"
tell document 1
print page 1 PostScript file FilePath ---->FilePath is of course, the path to the folder where you want the PS file save to.
end tell
end tell
On the top menu of this page there is a link for the “search” page. Click on that. Once the search page opens up, do a search for “Quark” and maybe throw in “PDF”. Then I would look at some of the other code examples posted.
Seriously though, there have got to be tens of examples on this board. Another pointer would be to download/look at the scripting documentation for Quark and Acrobat, and to become familar with the functions of the programs themselves. (Did you know that Distiller will automatically delete that log file all by itself if you ask nicely).
Yes, I did, prior to posting, and I didn’t stumble onto anything helpful. Thing is, that I should’ve mentioned: I’m on 9.2 (horrible, horrible, backwards workplace) and while there are bunches of PDF batch processing threads from Quark, they all rely on the Save to PDF feature of 10.x