I need to AutoPrint Postscript file by every generic box , but I can't output all generic box ps file. The QuarkXPress software is alway unexcepted quit or error -48 .
// Start Coding
on run
set _strStoragePath to (choose file as string)
tell application "QuarkXPress 4.1TC"
tell document 1
copy name to _docname
set _GenBoxTotal to (count of generic box)
tell print setup
// Some print setup properties setting
set printer type to "Generic Imagesetter"
end tell
// Set all box to Suppress printing first
repeat with from _BoxNum = 1 to _GenBoxTotal
tell generic box _BoxNum
set suppress printing to true
end tell
end repeat
end tell
// Set every generic box print to PS file
repeat with from _BoxID from 1 to _GenBoxTotal
if _BoxID > 1 then set suppress printing of generic box (_BoxID - 1) of document 1 to true
set suppress printing of generic box _BoxID of document 1 to false
set _SaveFullPath to ( _strStoragePath & _docname & "." & _BoxID & ".ps" as string )
1. Print document 1 PostScript file file _SaveFullPath
2. Print document 1 PostScript file _SaveFullPath
3. Print document 1 PostScript file ( _strStoragePath & _docname & "." & _BoxID & ".ps" as string )
end repeat
end tell
end run
// End Coding
I try the syntax 1. Or 2. Or 3 , The QuarkXPress is unexcepted quit when _BoxID variables looping to 2. Only one file '<document>.1.ps' can be print. I want to know How to fix it problem.
My Computer Config
MacOS 8.1 + QuarkXPress 4.1CT