Hulu Desktop Launch and Resolution Switch

So there are a couple apps out there to help you launch Hulu from Windows Media Center.  Unfortunately, there’s a problem if you use a resolution of 1920×1080 (1080p).    The Hulu Flash stream is optimized for a 1280×720 screen (720p).   Hence, when running Hulu with the higher resolution screen, you’ll notice stuttering and other scaling effects during high motion scenes.

One fix for this was originally posted here on the Green Button using AutoHotKey.   I had procrastinated implementing this because I didn’t realize how simple AutoHotKey was to use.   But implementing Squiggly‘s solution was quite straight forward, and within a few minutes I was able to modify the code to fix a couple of minor issues I discovered on Windows 7.

Here’s a version which fixes the focus issue on W7, and returns back to WMC a bit faster:

WinClose, Windows Media Center
WinWaitClose, Windows Media Center
ChangeDisplaySettings( (ClrDep:=32) , (Wid:=1280) , (Hei:=720) , (Hz:=60) )
Run, C:\HuluDesktop\HuluDesktop.exe
WinWaitActive, Hulu Desktop

#persistent
settimer, HULU, 100
return

HULU:
IfWinNotExist, Hulu Desktop
{
 ChangeDisplaySettings( (ClrDep:=32) , (Wid:=1920) , (Hei:=1080) , (Hz:=60) )
 Send, #!{Enter}
 WinWaitActive, Windows Media Center
 WinActivate
 ExitApp
}
return

ChangeDisplaySettings( cD, sW, sH, rR ) {
 VarSetCapacity(dM,156,0), NumPut(156,2,&dM,36)
 DllCall( "EnumDisplaySettings", UInt,0, UInt,-1, UInt,&dM ), NumPut(0x5c0000,dM,40)
 NumPut(cD,dM,104),  NumPut(sW,dM,108),  NumPut(sH,dM,112),  NumPut(rR,dM,120)
 Return DllCall( "ChangeDisplaySettings", UInt,&dM, UInt,0 )
}

It truely is this simple:

  1. Install AutoHotKey
  2. Cut an paste the above into a file called HuluLaunch.ahk (check the path to HuluDesktop.exe)
  3. Right click on the file and select “Compile Script”
  4. Use Media Center Studio to edit the existing Hulu Desktop launch program (or add a new one)

(1/31/2010)

OK, I’ll admit the Media Center Studio interface is less than intuitive.   Here are some hints:

  1. Once you start the app, click on the “Start Menu” icon on the main toolbar (my version has a blank icon)

    Start

  2. Now click on the Entry points expansion button in the lower left hand corner

    Entry

  3. Now click on the “Start Menu” tab at the top, and you should see something like this:

    Screen

  4. Now Click the “Application” icon, and fill it out as follows.   Note I put my hululanch.exe in a location with no spaces in the directory names.    I can’t swear that a location with a space doesn’t work, but it was on of the variables I eliminated during my testing.    Sorry, don’t remember which app I stole my icon from.

    Application

  5. Hit the disk icon in the upper left (Save), close the tab and you should be returned to the Start Menu.   The new app should show up in the Entry points list.
  6. Drag and Drop your new app from the Entry Points to the location on the Start Menu you desire.
  7. Hit Save again and restart Media Center.

Drop me a note: m i k e @ m p s h a r p . c o m if you have any questions or if you find this useful.    Or you can just follow up on my Green Button posting. I’ll see that in my mailbox as well.

Back to the HTPC W7 Config page.