RE: Quark ps-file
RE: Quark ps-file
- Subject: RE: Quark ps-file
- From: Jason Toews <email@hidden>
- Date: Fri, 8 Jun 2001 10:04:34 -0700
Alberto wrote:
>
one files work fine the other file not:
>
after registering of the print-file some some files start to write the
>
ps file on the desktop and other files stop the script with error -48
>
doubling filename...
>
the report window in script editor does not register any error
>
-----------------------------------------------------
Alberto ~ I've found that unless you wait until one .ps file has finished
printing before printing the second, you can have problems like this. I'm
sure someone will respond with a better solution to this problem, but below
is a snippet of code showing how I resolved it. I check the status of the
default desktop printer, via Desktop Printer Manager. If the status is
"idle" then nothing is currently being printed. You could also ask the
Finder to check the file type (or the size) of the PostScript file, to find
out if it's still being created. I've used that option in the past, as well
(with mixed results). Lastly, I didn't see any place in your code where you
close the Quark documents - was that intentional? Probably not the source
of your problem, but why not close the Quark docs as you finish
PostScripting them?
*******************
on open (docList)
repeat with CurrentFile in docList
tell application "QuarkXPress(tm) 4.11"
open CurrentFile
tell document 1
--after print setup
print PostScript file (CurrentFile as string) & ".ps"
copy (CurrentFile as string) & ".ps" to PsDokument
close
tell application "Desktop Printer Manager"
set statCheck to false
repeat while statCheck is false
delay 2
get queue status of the default printer
if result is idle then
set statCheck to true
end if
end repeat
ignoring application responses
quit
end ignoring
end tell
end tell
end tell
end repeat
end open
*******************
I've no idea if this will solve your problem, but I ran this code on my Mac
and it worked fab.
Jason