2010-12-08, 22:21
So here is my AHK script to remap the buttons on the Boxee remote for using Netflix inside Chrome. The idea is you use the mouse to navigate the website, and once you click "Play" or "Resume" to launch the player, the hotkeys become active. The sendclicks is to ensure the clicks are being sent to the plugin. The menu button already exits fullscreen, so that one is fine. I didn't remap the play button yet because for some reason there is a discrepancy on what I'm seeing on my laptop (WinXP) compared to the HTPC (Win7). I'll set that later. The OK button pauses it right now. The timer is a sleep mode preventer.
I know this isn't really related to XBMC, but eventually I'll have a launcher for XBMC built into this script.
Code:
#NoEnv
#Persistent
SetTitleMatchMode 2
SetTimer, CheckWindowsState, % 1000*30 ; Poll every 30 seconds
CheckWindowsState:
If (WinActive("ahk_class AGFullScreenWinClass") )
;If (WinActive("ahk_class ShockwaveFlashFullScreen") )
{
SendInput {Alt Up}
; MsgBox Full!
}
Return
#IfWinActive Netflix Movie Viewer
enter::
Click 400, 400
Sleep 300
Send f
Sleep 300
MouseMove, 0, 100
return
#IfWinActive ahk_class AGFullScreenWinClass
left::^left
right::^right
I know this isn't really related to XBMC, but eventually I'll have a launcher for XBMC built into this script.