Source Code

This script has not been checked by Spiceworks. Please understand the risks before using it.

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

#! 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# 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/)print"What is the Printers IP? ";chomp($printer_ip=<>);print"What is your Ready Message? ";chomp($printer_msg=<>);useIO::Socket;my$socket=IO::Socket::INET->new(PeerAddr=>$printer_ip,PeerPort=>"9100",Proto=>"tcp",Type=>SOCK_STREAM)ordie"Could not create socket: $!";my$data=<<EOJ\e%-12345X\@PJL JOB\@PJL RDYMSG DISPLAY="$printer_msg"\@PJL EOJ\e%-12345XEOJ;print$socket$data;

Screenshots

2 Comments

http://community.spiceworks.com/scripts/show/1184-change-a-networked-hp-laserjet-ready-message
I'll just leave this here for the version of this I posted here 2 years prior to this entry :P
I also credited source as well as linking to the version that does the 4 line HP printers