Friday, December 11, 2009

Change the HP LCD Ready Message

I've rewrote yaakov's hpsetdisp.pl in Python. It's always a good thing to have on any April Fools Day. The HP PCL/PJL Manual can be found here

#
# Learn To Computer 2009
# http://learntocomputer.blogspot.com/
#
# hpsetdisp.py
#
# The famous April Fools Day joke for HP printers with a
# character LCD. Change the printer_ip and display_msg
# to suit your needs.
#
# Keep in mind the characters per line for your display.
#

import sys
import socket

printer_ip = '192.168.0.101'
display_msg = 'REPLACE FLUX CAPACITOR'

b = ''
b = b + '\x1b%%-12345X@PJL JOB\n'
b = b + ('@PJL RDYMSG DISPLAY="%s"\n' % display_msg)
b = b + '@PJL EOJ\n\x1b%%-12345X'

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((printer_ip, 9100))
s.send(b)
s.close()

Some action shots:

Don't bring your printer to the public swimming pool.



Shameless self promotion.

1 comment:

  1. Computer training long island is the Best learning center in Lond island and if you want to learn the Computer do call them and enhance your knowledge by joining there.

    ReplyDelete