move file to desktop printer folder

For some reason, if I manually drag the .ps files to the desktop printer it works great. If I use the script to select a printer, then move the .ps file to it, I get:

Finder got an error: You cannot move filename.ps to the desktop printer LaserJet 5si, because it is not a print file .

It is a postscript printer and will handle the files all day long if I hand feed them. Does anyone have similar experiences with the Desktop Printers?


set pathToFile to (choose file with prompt "Please select the a file to print.") as string
set pathToDesktop to path to desktop as string

tell application "Desktop Printer Manager"
	set thePrinterList to name of desktop printers
end tell
set chosenPrinter to (choose from list thePrinterList with prompt ("Select a printer")) as string

set pathToPrinter to pathToDesktop & chosenPrinter
tell application "Finder"
	move alias pathToFile to alias pathToPrinter
end tell

Hi,

I haven’t run Classic Mac OS in a long while, but surely you can’t do that. Desktop printers aren’t folders, are they? The move command is for moving stuff to other folders. What you’re trying to do is treat moving something with AppleScript as if it were moving something the way you do in the GUI, but that’s not how AS works. You don’t script the view, you script the underlying model. In Finder’s model, it doesn’t make sense to move something to a desktop printer. I don’t think.