I wrote back on October 5th of last year about how we watch most of our TV on Hulu.  This is still true.  In fact one of the things that makes watching TV on Hulu so great, if I do say so myself, is a little program I wrote to mute the computer during commercials.

To pull off this trick I used AutoHotKey (AHK).  AHK is a great, in my opinion indispensible, program that lets you automate a huge number of tasks in Windows.  In their own words AHK can “Automate almost anything by sending keystrokes and mouse clicks.”  I use it at home and work.  If you can do it while sitting at your computer (click, drag, open, delete, move, close, type text, fill forms, etc) you can program AHK to do it for you.  I highly recommend you check it out.  You can even build a GUI in no time to speed tasks like data entry or to create a control panel of sorts.

My program,  HuluLauncher, does a couple of things.  First it sets your computer to presentation mode so your monitor won’t sleep even if there is no keyboard or mouse input.  Then it launches the TV page of Hulu.com in your default browser.  The real magic is the muting of the commercial.  It works by checking the color of a single pixel on the screen. When Hulu goes to commercial that pixel goes from black to grey.  When that happens, the computer gets muted. When it goes back to black the volume comes back on.  For the volume control to work you need to be watching in full screen mode.  When you press Ctrl+X the program exits setting the computer back to normal.

I’ve made the executable and the source code available for download on this page.  If you have AHK installed you only need the .ahk file.  The .exe file will run on almost any version of Windows without any install needed.

AHK is flexible enough that it wouldn’t be too hard to make the muting work for viewing at less than full screen.  If you would find that useful let me know and I’ll take a crack at it.  Or download the source and change it yourself.  If you do, let me know where I can download your code updates in the comments.

Download:

HuluLauncher.exe (376) (200kb)  — Stand alone, no install needed.  Just download and run it.

HuluLauncher.ahk (447) (1.5kb) — You’ll need AutoHotKey installed on your pc to run this one.

 

Tags:

Leave a Reply