tonedeaf Posted February 12, 2008 Posted February 12, 2008 (edited) 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.; 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 It'll also work on printers which accept PCL/PJL commands. My success rate is 100% on all the printers.Some more examples:BUZZ OFFSTEP AWAYSET TO STUNPAT EATS MICEGO AWAYNEED MORE SPACEPOUR ME A DRINKIN DISTRESSFEED MERADIATION LEAKNICE SHIRT!HANDS UPPRESS MY BUTTONSINSERT DISKLOOKS LIKE RAINBUY ME LUNCHTAKE A BREAKINSERT QUARTERNO PRINT FOR YOUNICE HAIRNEED A MINT? Edited February 12, 2008 by tonedeaf
JRSmile Posted February 12, 2008 Posted February 12, 2008 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 $a=StringSplit("547275737420796F757220546563686E6F6C75737421","") For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4) Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])));''Chr("a")&"HI" Next ;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile; MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-)
ptrex Posted February 12, 2008 Posted February 12, 2008 @tonedeaf This is what I call real amusement !! very nice !! regards ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
gseller Posted February 12, 2008 Posted February 12, 2008 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..
Bert Posted February 12, 2008 Posted February 12, 2008 (edited) 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. 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 Edited February 12, 2008 by Volly The Vollatran project My blog: http://www.vollysinterestingshit.com/
gseller Posted February 12, 2008 Posted February 12, 2008 @ Volly - SWEET, I was thinking of doing something like that but would never have thought about the embedded part... Nice!
Achilles Posted February 20, 2008 Posted February 20, 2008 (edited) 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? Edited February 20, 2008 by Piano_Man My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
blitzkrg Posted February 20, 2008 Posted February 20, 2008 confirmed working on lexmark printers as well. This is great thanks!
James Posted February 20, 2008 Posted February 20, 2008 It would be nice if this worked on epson! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
james3mg Posted February 21, 2008 Posted February 21, 2008 Dang...no joy on a HP DesignJet750c+ "There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110
James Posted February 21, 2008 Posted February 21, 2008 I converted it to VB and used it at college! It's ace! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
James Posted February 21, 2008 Posted February 21, 2008 You will need to look for ports. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
James Posted February 21, 2008 Posted February 21, 2008 Microsoft Firewall checks for these so AutoIt should be able to. Look at Google! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
ptrex Posted February 22, 2008 Posted February 22, 2008 @SWift Download HP JetAdmin and you see them all nicely in a Gui. regards ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now