I am trying to create a folder and attach a folder action which when Quark files are added they are printed and postscript files are also saved to another directory, I can get the normal prints but the postcript files generate many error no.s…can anyone assist
Here is my script with just the normal prints - how can I also get the postscript files:
on adding folder items to this_folder after receiving added_items
tell application "Finder"
set my_item to (item 1 of the added_items)
if (file type of my_item as text) = "XDOC" then
open my_item
tell application "QuarkXPress™ 4.11"
print (page 1) of document 1
close front document saving no
end tell
end if
activate
end tell
end adding folder items to
If you havent the “Virtual Printer” driver from “Adobe”,
go to at Adobe’s dawnload page and install à printer driver (versions “8.6” to “8.8”) : Adobe Macintosh Printer Drivers
Here a small code for print QXP document with the desktop “Virtual Printer” driver :
--[Script Print QXP Document To PS]
property VirtualPrinter : "Virtual Printer"
global OldPrinter
tell application "Desktop Printer Manager"
set OldPrinter to name of default printer
set default printer to desktop printer VirtualPrinter
end tell
tell application "Quark Passport™ 4.11"
activate
print front document
end tell
tell application "Desktop Printer Manager"
set default printer to desktop printer OldPrinter
end tell
--[/Script]
I don’t know (still) Quark 6’s syntax about postscript printing, but, as far as I remember, this command is available to Quark 4.x… (never tried Quark 5, but should not be essential differences…)
My set up is Applescript 1.8.3, OS 9.2.2, QXP 4.11, Laserwriter8
ok - here are the results:
tell application "QuarkXPress™ 4.11"
set Doc to ("" & file path of front document & ".ps")
save page 1 of front document in Doc as "EPSF"
end tell
This works - but still have the font issue, the script would halt because of the binary dialog box Quark throws up, and it doesn’t cope with the watched folder; if multiple docs are added only the first one gets taken up with the script.
--[Script Print QXP Document To PS]
property VirtualPrinter : "Virtual Printer"
global OldPrinter
tell application "Desktop Printer Manager"
set OldPrinter to name of default printer
set default printer to desktop printer VirtualPrinter
end tell
tell application "Quark Passport™ 4.11"
activate
print front document
end tell
tell application "Desktop Printer Manager"
set default printer to desktop printer OldPrinter
end tell
--[/Script]
This one generates the -48 error through the laserwriter.
tell application "QuarkXPress™ 4.11"
print PostScript file "somename.ps"
close front document saving no
end tell
This one sends the file into dev/null - I have searched the hard drive - nowhere to be seen and I have no other volumes attached.
My orginal script just for prints:
on adding folder items to this_folder after receiving added_items
tell application "Finder"
set my_item to (item 1 of the added_items)
if (file type of my_item as text) = "XDOC" then
open my_item
tell application "QuarkXPress™ 4.11"
print (page 1) of document 1
close front document saving no
end tell
end if
activate
end tell
end adding folder items to
This also now throws up a -48 error - the printers also seem to print in the foreground
only when the script is run - how do u lock down to print in the background.
I have tried both Laserwriter and Adobe PS 8.8