AutoIt Forums: HP Printer Display Hack - AutoIt Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

HP Printer Display Hack Cool Trick to pull on company printers. Rate Topic: ****- 1 Votes

#1 User is offline   tonedeaf 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 152
  • Joined: 07-June 05

Posted 12 February 2008 - 02:02 PM

I found a C# version of this hack on the internet.
Didn't take me long to convert it to an AutoIt script :)

Change $strPrinterIP value to Network IP Address of the printer.
Some printers have an option to print their configuration, look for the IP Address under TCP/IP.
Also, check Printer properties in Printers & Faxes in Control Panel, you can find the IP Address in the Ports Tab.

[ code='text' ]    ( Popup )
; Modify the Network Printer IP address and the message to display on the LCD screen ; Make sure the message is short enough to fit on the printer display $strPrinterIP = "10.30.210.40" $strMessage = "INSERT COIN" TCPStartUp() $socPrinter = TCPConnect($strPrinterIP, 9100) If $socPrinter = -1 Then Exit $strCommand = Chr(27) & Chr(27) & "%-12345X@PJL RDYMSG DISPLAY = " & Chr(34) & $strMessage & Chr(34) & @LF & Chr(27) & "%-12345X" & @LF TCPSend($socPrinter, $strCommand)


Results on my company printer :D

http://xs224.xs.to/xs224/08072/imag0024793.jpg

It'll also work on printers which accept PCL/PJL commands. My success rate is 100% on all the printers.

Some more examples:
BUZZ OFF
STEP AWAY
SET TO STUN
PAT EATS MICE
GO AWAY
NEED MORE SPACE
POUR ME A DRINK
IN DISTRESS
FEED ME
RADIATION LEAK
NICE SHIRT!
HANDS UP
PRESS MY BUTTONS
INSERT DISK
LOOKS LIKE RAIN
BUY ME LUNCH
TAKE A BREAK
INSERT QUARTER
NO PRINT FOR YOU
NICE HAIR
NEED A MINT?

:lol:

This post has been edited by tonedeaf: 12 February 2008 - 02:12 PM


#2 User is offline   JRSmile 

  • Freak,Cheater,Coder
  • PipPipPipPip
  • Group: Full Members
  • Posts: 417
  • Joined: 20-September 05
  • Location:Germany, Cologne

Posted 12 February 2008 - 02:24 PM

THATS THE FUKN BEST HACK IVE EVER SEEN :)
i created a script that turns all our printers into a slot machine ...
[BAR] [BAR] [BAR]

Best regards,
J

#3 User is offline   ptrex 

  • Mass Spammer!
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 2,272
  • Joined: 03-June 05

Posted 12 February 2008 - 02:46 PM

@tonedeaf

This is what I call real amusement !! :graduated:

very nice !!

regards

ptrex

#4 User is offline   gseller 

  • Mass Spammer!
  • PipPipPipPipPipPip
  • Group: Full Members
  • Posts: 1,053
  • Joined: 16-March 07

Posted 12 February 2008 - 04:07 PM

This will be alot of fun at work, specially since I sit on the other side of a cube wall from the printer. Haha.. Thanks for sharing..

#5 User is offline   MPH 

  • Mass Spammer!
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 7,443
  • Joined: 20-August 05
  • Gender:Not Telling

Posted 12 February 2008 - 07:21 PM

One better. I made a GUI to make it easy and it remembers your last entry. I also made it so you can access the embedded webserver most HP printers have.
[ code='text' ]    ( ExpandCollapse - Popup )
#include <GuiConstants.au3> #include <IE.au3> GuiCreate("Set message on HP Printer", 381, 197,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $ini = IniRead(@ScriptDir&"/printerCFG.ini", "1", "1", "") $ini2 = IniRead(@ScriptDir&"/printerCFG.ini", "1", "2", "") $Input_1 = GuiCtrlCreateInput($ini2, 40, 40, 310, 20) $Input_2 = GuiCtrlCreateInput($ini, 40, 100, 310, 20) $Button_3 = GuiCtrlCreateButton("Set", 40, 130, 40, 20) $Button_4 = GuiCtrlCreateButton("Exit", 95, 130, 40, 20) $Button_5 = GuiCtrlCreateButton("Access printer via embedded webserver", 150, 130, 200, 20) $Label_5 = GuiCtrlCreateLabel("IP Address of printer", 40, 20, 110, 20) $Label_6 = GuiCtrlCreateLabel("Message to be displayed", 40, 80, 120, 20) GuiSetState() While 1     $msg = GuiGetMsg()     Select     Case $msg = $GUI_EVENT_CLOSE or $msg = $Button_4         ExitLoop     Case $msg = $Button_3         _setmessage()     Case $msg = $Button_5         $strPrinterIP = GUICtrlRead($Input_1)         _IECreate("http://"&$strPrinterIP)     Case Else ;;;     EndSelect WEnd Exit func _setmessage()     $strPrinterIP = GUICtrlRead($Input_1)     $strMessage = GUICtrlRead($Input_2)     TCPStartUp()     $socPrinter = TCPConnect($strPrinterIP, 9100)     If $socPrinter = -1 Then         MsgBox(48, "Error!", "IP is incorrect or Printer is not online")     else            $strCommand = Chr(27) & Chr(27) & "%-12345X@PJL RDYMSG DISPLAY = " & Chr(34) & $strMessage & Chr(34) & @LF & Chr(27) & "%-12345X" & @LF         TCPSend($socPrinter, $strCommand)         IniWrite(@ScriptDir&"/printerCFG.ini", "1", "1", $strMessage)         IniWrite(@ScriptDir&"/printerCFG.ini", "1", "2", $strPrinterIP)     endif EndFunc

This post has been edited by Volly: 12 February 2008 - 07:22 PM


#6 User is offline   gseller 

  • Mass Spammer!
  • PipPipPipPipPipPip
  • Group: Full Members
  • Posts: 1,053
  • Joined: 16-March 07

Posted 12 February 2008 - 08:18 PM

@ Volly - SWEET, I was thinking of doing something like that but would never have thought about the embedded part... Nice! :D

#7 User is offline   daremo 

  • Newbie
  • Group: Full Members
  • Posts: 7
  • Joined: 31-December 03

Posted 19 February 2008 - 09:22 PM

This worked on a Dell printer as well.

#8 User is offline   Darth 

  • Member
  • Pip
  • Group: Full Members
  • Posts: 65
  • Joined: 26-June 07

Posted 20 February 2008 - 04:26 AM

Volly can I hug you?

#9 User is offline   Achilles 

  • Achilles == Ichigo
  • PipPipPipPipPipPipPip
  • Group: Full Members
  • Posts: 2,826
  • Joined: 23-July 06
  • Location:Quito, Ecuador

Posted 20 February 2008 - 04:43 AM

This is awesome! Thanks tonedeaf and Volly!

Edit: Quick question, I don't have a printer but am planning on using this at school... Does it reset when you exit the script? Or can you just hit reset on the printer... or reset the text to the original?

This post has been edited by Piano_Man: 20 February 2008 - 04:44 AM


#10 User is offline   blitzkrg 

  • Spammer!
  • PipPipPip
  • Group: Full Members
  • Posts: 230
  • Joined: 12-April 04
  • Gender:Male

Posted 20 February 2008 - 04:39 PM

confirmed working on lexmark printers as well.

This is great thanks!

#11 User is offline   JamesBrooks 

  • Do You Wanna Be A Human Controlling An Avatar?
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 8,076
  • Joined: 24-November 06
  • Gender:Male
  • Location:Null

Posted 20 February 2008 - 07:18 PM

It would be nice if this worked on epson!

#12 User is offline   james3mg 

  • I resent the title "Spammer!" ;-)
  • PipPipPipPipPip
  • Group: Full Members
  • Posts: 728
  • Joined: 12-April 05
  • Location:Arizona

Posted 21 February 2008 - 09:11 PM

Dang...no joy on a HP DesignJet750c+ :(

#13 User is offline   JamesBrooks 

  • Do You Wanna Be A Human Controlling An Avatar?
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 8,076
  • Joined: 24-November 06
  • Gender:Male
  • Location:Null

Posted 21 February 2008 - 09:58 PM

I converted it to VB and used it at college! It's ace!

#14 User is offline   Swift 

  • Get Linux Ubuntu Now.
  • Icon
  • Group: Banned
  • Posts: 1,706
  • Joined: 23-December 07
  • Location:Get Linux Ubuntu Now.

Posted 21 February 2008 - 10:07 PM

How do I get the printers IP?

#15 User is offline   JamesBrooks 

  • Do You Wanna Be A Human Controlling An Avatar?
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 8,076
  • Joined: 24-November 06
  • Gender:Male
  • Location:Null

Posted 21 February 2008 - 10:09 PM

You will need to look for ports.

#16 User is offline   Swift 

  • Get Linux Ubuntu Now.
  • Icon
  • Group: Banned
  • Posts: 1,706
  • Joined: 23-December 07
  • Location:Get Linux Ubuntu Now.

Posted 21 February 2008 - 10:13 PM

how do I check my ports for my printer?

#17 User is offline   JamesBrooks 

  • Do You Wanna Be A Human Controlling An Avatar?
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 8,076
  • Joined: 24-November 06
  • Gender:Male
  • Location:Null

Posted 21 February 2008 - 10:15 PM

Microsoft Firewall checks for these so AutoIt should be able to. Look at Google!

#18 User is offline   Swift 

  • Get Linux Ubuntu Now.
  • Icon
  • Group: Banned
  • Posts: 1,706
  • Joined: 23-December 07
  • Location:Get Linux Ubuntu Now.

Posted 21 February 2008 - 11:46 PM

How Do I get my printer IP? I wanna try this :(

#19 User is offline   ptrex 

  • Mass Spammer!
  • Icon
  • Group: AutoIt MVPs(MVP)
  • Posts: 2,272
  • Joined: 03-June 05

Posted 22 February 2008 - 11:56 AM

@SWift

Download HP JetAdmin and you see them all nicely in a Gui.

regards

ptrex

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users