Title says most of it… Here is the script.
on adding folder items to this_folder after receiving added_items
repeat with this_item in added_items
tell application "Finder"
print this_item
delete this_item
end tell
end repeat
end adding folder items to
Trying to get .ps files to print on our B/W as they are saved into a folder. We have multiple printers on our network. How do I tell this action which printer to print to?
Extensive search on this site, Google and Apple site yeilded nothing. Maybe I’m blind… please help!
Here are some useful scriptlets to get you going (you don’t need much help…:))
It’s important to use the right name (not always obvious). This is one way to discover them:
set P to paragraphs of (do shell script "lpstat -p")
set Ptrs to {}
repeat with aP in P
set end of Ptrs to word 2 of contents of aP
end repeat
Ptrs
To choose a printer, you:
tell application "Printer Setup Utility" to set current printer to printer thePrinterName
I only have two, so I use this to swap back and forth:
tell application "Printer Setup Utility"
activate
set myPrinters to every printer
set DefaultPrinter to current printer
if item 1 of myPrinters is DefaultPrinter then
set current printer to item 2 of myPrinters
else
set current printer to item 1 of myPrinters
end if
display dialog (name of current printer) as text default button 1 buttons {"OK"} giving up after 3
quit
end tell
To choose from among many:
tell application "Printer Setup Utility"
set pn to name of every printer
set myLP to (choose from list pn with prompt "Choose a Printer, Please") as string
set current printer to printer myLP
end tell