[Funny] Fun With C# and HP Laserjets

I just recently stumled across Ode To Code. Good stuff.

Just saw this article about how to write messages on a networked HP Printer's LCD readout in C#. It even supplies random messages if you can't think of one - I think these are pretty funny:

    public static string GetRandomMessage()
    {
      string [] Messages = { 
                             "BUZZ OFF", 
                             "TOUCH ME",
                             "STEP AWAY",
                             "SET TO STUN",
                             "SCORE = 3413",
                             "PAT EATS MICE",
                             "FEED ME",
                             "GO AWAY",
                             "NEED MORE SPACE",
                             "POUR ME A DRINK",
                             "IN DISTRESS",
                             "NICE SHIRT",
                             "GO AWAY",
                             "NO PRINT FOR YOU",
                             "RADIATION LEAK",
                             "HANDS UP",
                             "PRESS MY BUTTON",
                             "TAKE ME HOME",
                             "LOOKS LIKE RAIN",
                             "HELLO WORLD",
                             "NICE HAIR",
                             "NEED A MINT?",
                             "BE GENTLE",
                             "BE KIND",
                             "INSERT DISK",
                             "BUY ME LUNCH",
                             "DONT STOP",
                             "COME CLOSER",
                             "TAKE A BREAK",
                             "INSERT QUARTER",
                             "BLACK SABBATH"
      };

Hot damn, computers are fun.

UPDATE: I compiled it so you can give it a whirl. [download]. You have to run it from the command line, so if you save it right on the C:\ drive, you can do Start->Run->“cmd“->“c:\hpMessages {PRINTERNAME} “HELLO”

You have to replace {PRINTERNAME} with the network name or the IP of the printer. I used IP and it worked fine.

Requires .NET Framework 1.1.

2 Comments

Comments have been disabled for this content.