Hey,
This should be an easy one for all you scripters.
I want to create a script that prints a .ps file with a one of my desktop printers.
I´m using Folder Action Plus for this and my first attempt looks like this.
on adding folder items to this_folder
tell application "Desktop Printer Manager"
set default printer to desktop printer "myPrinter"
end tell
if button returned of (display dialog "Do you wish to print?" buttons {"Print", "Cancel"} default button 1) is "Print" then
Need help with this part. Everything I´ve tried so far doesn´t work. I want to print the document saved in this folder and then delete it.
end if
end adding folder items to
This wouldn´t be to hard to solve I guess. Man, I must be tired! :?
Thanks!
Tobbe
If you’re using Mac OS X 10.2 you can use the “lpr” command. Since I don’t know if you’re using 10.2 I won’t go into detail. But you can type “man lpr” at the terminal for more information on how to use it. If you’re using Mac OS 9 or earlier, I think that desktop printers are treated as folders, so just tell Finder to move your file into the folder on the desktop that bears the printer name.
Hey Justin,
I´m using Mac OS 9.2.2. I´ve tried your suggestion but no luck. My script looks like this now.
on adding folder items to this_folder
tell application "Desktop Printer Manager"
set default printer to desktop printer "l394s-01"
end tell
if button returned of (display dialog "Do you wish to print?" buttons {"Print", "Cancel"} default button 1) is "Print" then
tell application "Finder"
select every item of folder "test" of startup disk
move selection to folder "l394s-01" of desktop
end tell
end if
end adding folder items to
"Drop•PS is a PostScript downloader; with it, you can transmit text files containing PostScript commands to any AppleTalk-connected PostScript printer. "
Thanks, but if it´s like they say AppleTalk-connected printers only then I can´t use it due to us printing via a NT-printspooler server. I´ll check it out though.
Thanks.
/Tobbe
Yes we know that. But we are not able to use appletalk due to switchconfigurations. And we can´t do anything about it. We´re forced to adapt our Macs to this situation.
We can´t use appletalk at all on our network. We use Dave to connect to printers and homedirectorys.
Thanks!
Tobbe