While this is sure to work on any networked HP printer, it will also work for any other printer that uses the HPPJL.
Replacement suggestions include:
- Knock, Knock, Neo
- I'm Lonely
- Hug Me
- Insert Coin
- Enter Password
- Internal Fire Detected
- Feed Me Kittens
- Clean Lint Filter
- I Can See You
- Feed Me...
- Will Print For Beer
- Nap Time
- Skynet Online
- #!/usr/bin/perl
- # $Id: hpsetdisp.pl 2 2008-07-10 00:05:58Z 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
- # IF YOU ARE UNCERTAIN ABOUT THE ADVISABILITY OF USING IT, DO NOT!
- #
- use strict;
- use warnings;
- unless (@ARGV) { print "usage: $0
\" \n" ; exit }\" - if ($ARGV[3]) { print "Did you forget the quotes around your new 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;
Post a Comment