* RE: Print
[not found] ` <BD6B3BD6A3C3EC4FBC45FF024CE1043707619175@WAPRDVSEBE10.gsm1900.org>
@ 2008-08-15 15:37 ` Dave Korn
0 siblings, 0 replies; only message in thread
From: Dave Korn @ 2008-08-15 15:37 UTC (permalink / raw)
To: Thread TITTTL'd!
[-- Attachment #1: Type: text/plain, Size: 311 bytes --]
Stepp, Charles wrote on 15 August 2008 16:02:
> Here's a little script I use to send to an HP printer. You can pipe into
> it.
Here's a little script *I* use to send to an HP printer. You can put it
in your pipe and smoke it!
;-)
cheers,
DaveK
--
Can't think of a witty .sigline today....
[-- Attachment #2: hpsetdisp.pl --]
[-- Type: application/octet-stream, Size: 1290 bytes --]
#!/usr/bin/perl
# $Id: hpsetdisp.pl 11 2006-03-22 01:21:03Z yaakov $
# hpsetdisp.pl
# Connects to a JetDirect equipped HP printer and uses
# HP's control language to set the ready message on the
# LCD display. Takes an IP address and message on the
# command line. My favorite message is "INSERT COIN".
# Keep in mind the limitations of the display when composing
# your clever verbiage.
#
# THIS PROGRAM IS PROVIDED WITH NO WARRANTY OF ANY KIND EXPRESSED OR IMPLIED
# THE AUTHOR CANNOT BE RESPONSIBLE FOR THE EFFECTS OF THIS PROGRAM
# IF YOU ARE UNCERTAIN ABOUT THE ADVISABILITY OF USING IT, DO NOT!
#
# Yaakov (http://kovaya.com/)
use strict;
use warnings;
unless (@ARGV) { print "usage: $0 <ip address> \"<RDYMSG>\"\n" ; exit }
if ($ARGV[3]) { print "Did you forget the quotes around your clever message?\n" ; exit }
my $peeraddr = $ARGV[0];
my $rdymsg = $ARGV[1];
chomp $peeraddr;
use IO::Socket;
my $socket = IO::Socket::INET->new(
PeerAddr => $peeraddr,
PeerPort => "9100",
Proto => "tcp",
Type => SOCK_STREAM
) or die "Could not create socket: $!";
my $data = <<EOJ
\e%-12345X\@PJL JOB
\@PJL RDYMSG DISPLAY="$rdymsg"
\@PJL EOJ
\e%-12345X
EOJ
;
print $socket $data;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-08-15 15:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <g7vokt$np8$1@ger.gmane.org>
[not found] ` <BD6B3BD6A3C3EC4FBC45FF024CE1043707619175@WAPRDVSEBE10.gsm1900.org>
2008-08-15 15:37 ` Print Dave Korn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).