Turning on printer with print sharing

Posted on
Tue Jul 08, 2008 4:34 pm
bjojade offline
Posts: 285
Joined: Aug 03, 2005
Location: Wausau, WI

Turning on printer with print sharing

O.K, this is a 'just because I think I can' feature I want to implement.

I have an old laser printer (Apple LaserWriter 16/600) that still works just fine for the few pages I need to print at home. It hangs out in the basement out of the way. Right now, I have it attached to an appliance linc so I can remotely turn it on when I need to print something as it doesn't have good power savings. I also have an auto power off feature as I tend to forget to turn things off.

Well, I upgraded my wireless network to a Time Capsule and found that I no longer could print to the printer via AppleTalk, so I had to print to it via TCP/IP. The problem there was that it didn't just 'show up' in bonjour, so I set it up on my Indigo server and enabled printer sharing. All is well now.

Well, I got to thinking, it would be REALLY cool if there were some way to have the system know when a print job comes in that it would tell Indigo to turn on the printer, then wait a minute or so to send the print job while the printer warms up. Now, if I'm printing multiple things, it shouldn't go through this wait cycle until the printer has been turned off.

I'm very green with Applescript. Does this sound like something that's even going to be possible?

Brian Jojade
HappyMac Digital Electronics
http://www.happymacshop.com

Posted on
Sat Jul 12, 2008 10:42 am
bjojade offline
Posts: 285
Joined: Aug 03, 2005
Location: Wausau, WI

(No subject)

I should note that I am currently running OSX 10.5 server and using the print server function. However, this machine could be regular OSX as well if that would make it easier.

Brian Jojade
HappyMac Digital Electronics
http://www.happymacshop.com

Posted on
Sun Jul 13, 2008 10:55 pm
DPattee offline
Posts: 453
Joined: Jan 14, 2004
Location: Redmond, WA

(No subject)

Check out the 'lpq' command line. You could use AppleScript to execute the command with the correct arguments and then interrogate the results. If you saw that there was something in the queue you could fire up the printer.

Posted on
Mon Jul 14, 2008 6:23 am
JeffS offline
Posts: 34
Joined: Jul 14, 2008

(No subject)

DPattee & bjojade-

Not that I have a better idea, but the 'lpq' command probably won't get you anywhere because there is a "Chicken and the Egg" situation. The 'lpq -S <ServerName> -P <Queue>' command will return the current jobs that are sitting in the queue of an LPR/LPD printer, however in bojade's case the printer would not be powered on yet to receive the job into the queue to look at.

I'm not sure, (I'm also very new to AppleScript) but I would think there should be a way to look at the current state of a printer in OS X, and if there is a job waiting to be sent to the printer, or something that could intercept the print command within Indigo and fire the printer up.

Take care!

Jeff

Posted on
Mon Jul 14, 2008 1:55 pm
DPattee offline
Posts: 453
Joined: Jan 14, 2004
Location: Redmond, WA

(No subject)

The entire point of a print queue is that you can print things whether or not the printer is ready - whether it is paused because it is out of paper, or totally offline because it is unplugged.

Posted on
Mon Jul 14, 2008 7:56 pm
JeffS offline
Posts: 34
Joined: Jul 14, 2008

(No subject)

DPatte-

I apologize, I misunderstood your original statement. In my work I normally use the 'lpq' command to query the status of jobs on the receiving side - meaning the print server attached to, or imbedded in the printer itself. I had never used the command to query the status of jobs on the sending server or workstation. Sure enough you can open a terminal and just enter 'lpq' with nothing after it to get the status of the print queue of the default printer, or use 'lpq -P <Printer_Name_with_underscores_instead_of_spaces>' to get the status of a specific print queue. As you mentioned, I'm sure you could use the result of this command within AppleScript to pass information on to Indigo. You may also need to reset the status of the queue after the printer has been powered on if the OS had disabled it because it was not available at print time - I don't know if recovery is automatic.

Again, sorry for the misinformation, and I hope that bjojade is able to get things to work.

Take care!

Jeff

Posted on
Mon Jul 14, 2008 10:00 pm
bjojade offline
Posts: 285
Joined: Aug 03, 2005
Location: Wausau, WI

(No subject)

Hmm, sounds like that may be a start. However, it would seem that I would need to be constantly sending that command.

I wonder if there is a way to use folder action scripts to get an Applescript triggered. Does the print job get stored as a file somewhere while waiting to print? If so, I could trigger a script any time a file gets added to that folder to turn on the printer.

Brian Jojade
HappyMac Digital Electronics
http://www.happymacshop.com

Posted on
Wed Jul 16, 2008 2:38 am
DPattee offline
Posts: 453
Joined: Jan 14, 2004
Location: Redmond, WA

(No subject)

I'm not sure what's going on, but I seem to have the 'Printer Setup Utility' on my machine, as far as applescript is concerned, even though the old Print Center app is long gone.

Printer Setup Utility does have the Print Center Suite terms in it which is what you want.

Posted on
Mon Jan 07, 2013 3:28 am
Martin Joseph offline
Posts: 37
Joined: Nov 12, 2010
Location: Seattle, WA

Re: Turning on printer with print sharing

I realize this is an older thread.

I was thinking the same thing as OP.

Does indigo subscribe to rss feeds for messaging?

Because I see cups administration has an rss feed that will notify for selected events ie queue started.

Just a thought.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 18 guests