I’m using Quark 4.1 to create PostScript files in a specific location on my Mac’s hard drive, ready for distilling into PDF format. However, I can’t get the PS file to build properly. The error message I get reads “Duplicate file name”. Here’s a section of the script:
set document_name to get name
set PostScript_filename to document_name & ".ps"
set thepath to "Acrobat Volume:Desktop Folder:Acrobat folder:in:" & PostScript_filename
print PostScript file {thepath & PostScript_filename} copies 1 OPI include images cover page no plates {"Cyan", "Magenta", "Yellow", "Black"}
Where am I going wrong? Help!
Hi,
I will help you with your script. I assume the portion of the script is enclosed in a “tell application “QuarkXPress”” block
- set document_name to get name
well, “get name”, of what?
set document_name to name of document 1
- set PostScript_filename to document_name & “.ps”
well, here you receive a list {“name of the document”, “.ps”}
set PostScript_filename to (document_name & “.ps”) as text
- set thepath to “Acrobat Volume:Desktop Folder:Acrobat folder:in:” & PostScript_filename
well, you are a “list” lover
set thepath to (“Acrobat Volume:Desktop Folder:Acrobat folder:in:” &PostScript_filename) as text
- print PostScript file {thepath & PostScript_filename} copies 1 OPI include images cover page no plates {“Cyan”, “Magenta”, “Yellow”, “Black”}
well, if you read the file path, you notice you have already given the name of the file in the variable thepath, so you don’t need to put two times the filename “thepath & PostScript_filename” and, when you make a concatenation of text, dont forget to set the result as text or string, else you get a list of string, and this is not a valid parameter for a path.
I think this make the things more clear for you
cya
Thanks for the help - the ‘as text’ trick has helped me with several other scripts as well.
Unfortunately, the PostScripting script is now throwing up different error messages. When the file begins to build, the printing progress bar processes each of the four plates in turn, then displays the following two error messages at me:
An unknown error has occurred
File is already open [-47]
When I look in the destination folder, I’ve got nothing there, and the original document is in an entirely different location, so it can’t be that to which it refers…
Stuck again…
Hi Anthony,
I have payed around for more than one hour on your script. It will not work.
print PostScript file thepath copies1 OPI include images cover page no plates {"Cyan", "Magenta", "Yellow", "Black"}
is incorrect. use the right commands order and syntax from the QuarkXPress dictionary. Specially the “print” argument must be the file you want to print, so write:
print document 1 copies 1 OPI include images cover page no plates {"Cyan", "Magenta", "Yellow", "Black"}
The “PostScript file” argument I think works only with the old 7 System versions. You can try, on the System 8 versions to make a new printer printing to PostScript files, setting it to default, then tell QuarkXPress to print. It will use the default printer, so it prints to a PostScript file. This seems to me logically, but i have not tested it yet.
cya