Leopard 10.5.2 Default Printer Bug?

Hi All,

I’ve noticed that lpadmin, lpotions, and any AppleScript solutions I’ve come across fail to work if your default printer is current set to “Last Printer Used.” As long as something other than that is initially selected, then the usual solutions work.

Has anyone else run across this in 10.5.2?

Additionally, I can’t seem to run this via osascript:

set myPrinter to "Some Printer" tell application "Printer Setup Utility" to set current printer to printer myPrinter
I get the following error:

[code]file:///System/Library/ScriptingDefinitions/CocoaStandard.sdef:2: I/O warning : failed to load external entity “file://localhost/System/Library/DTDs/sdef.dtd”

[/code]

Any thoughts? Anyone have a possible solution for the automation of setting the default printer of 90-some-odd computers?

Hi,

your code works flawlessly on my machine (G5 10.5.2)
I tried this


tell application "Printer Setup Utility" to set a to name of printers
set b to (choose from list a) as text
tell application "Printer Setup Utility" to set current printer to printer b

Okay, the above error I get when running the script via osascript has to do with not having a file which is installed with the dev tools. It requires the sdef definition file. How bizarre.

In any event, I’m going to make the brash assumption that you already had a printer selected as your default when the above scripts were run. The problem I have is that it doesn’t change the default printer if your current default printer is set to “Last Printer Used.” Or maybe it’s just me…

-Rob