Windows 8 - Netflix App or WMC plug-in? - Page 5 - AVS Forum | Home Theater Discussions And Reviews
Baselworld is only a few weeks away. Getting the latest news is easy, Click Here for info on how to join the Watchuseek.com newsletter list. Follow our team for updates featuring event coverage, new product unveilings, watch industry news & more!



Forum Jump: 
 4Likes
Reply
 
Thread Tools
post #121 of 135 Old 02-20-2015, 05:59 PM
Advanced Member
 
jmone's Avatar
 
Join Date: May 2007
Posts: 521
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 11 Post(s)
Liked: 37
Hi mholdate,
Thanks for the script! I've been modding it to work with JRiver Media Center and have posted the details at Another Way To Watch Netflix With a 10 Foot Interface & RC (Win8/10 only).

To your script I've added:
- start and stop the Netflix App
- ability to change refresh rates
- Play/Pause key now works
- Stop will terminate the script and return to the app that launched it (MC)

Edit - I've not (yet) played with your navigation sections but for me I'mm prob remap some of the keys.

Thanks
Nathan

Here is the code and I've marked the section of my changes:
Code:
Original Script and Author at https://gist.github.com/holgate/01d73c6ac33ab4b6d66f
;Modified by jmone for JRiver Media Center use http://yabb.jriver.com/interact/index.php?topic=95627.0
;
;DEFINE CONSTANTS...
;
;
; Global value settings that are independant to display-size...
;
; MAIN MENU
boundaryLeft := 120
boundaryRight := 1800
leftScrollbarXpos := 28
leftScrollbarYpos := 1065
rightScrollbarXpos := 1891
rightScrollbarYpos := 1065
;
; For 1920x1080px displays, with "Change the Size of Apps on the screen" set to "Default"...
;
; MAIN MENU
mainmenuHeaderTop := 140  ;top categories text start Y pos
mainmenuGridTop := 182  ;top thumbs start Y pos
mainmenuStartXpos := 800  ; init X position
mainmenuStartYpos := 350  ; init Y position
mainmenuThumbDisplacementX := 141
mainmenuThumbDisplacementY := 196
; SEARCH MENU
searchButtonXpos := 1718
searchButtonYpos := 70
; SEARCH RESULTS
searchresultsStartXpos := 560  ; init X position
searchresultsStartYpos := 265  ; init Y position
; NAV MENU
navmenuButtonXpos := 1646
navmenuButtonYpos := 69
navmenuFirstMenuButtonXpos := 156
navmenuFirstMenuButtonYpos := 63
navmenuThumbDisplacementX := 267
navmenuThumbDisplacementY := 44
; CATEGORIES MENU
categoriesButtonXpos := 1900
categoriesButtonYpos := 1047
categoriesFirstMenuButtonXpos := 174
categoriesFirstMenuButtonYpos := 304
categoriesThumbDisplacementX := 195
categoriesThumbDisplacementY := 265
; DETAILS PAGE
backnavXpos := 38  ; top back nav button X pos
backnavYpos := 68  ; top back nav button Y pos
seasonButtonXpos := 228
seasonButtonYpos := 368
seasonButtonRowHeight := 46
detailsHeaderTop := 368  ;top season selector button start Y pos
detailsGridTop := 416  ;top thumbs start Y pos
detailsStartXpos := 268  ; init X position
detailsStartYpos := 518  ; init Y position
detailsThumbDisplacementX := 381
detailsThumbDisplacementY := 0
; PLAYING MEDIA
;   SKIP/NAV CONTROLS
skipnextXpos := 330
skipnextYpos := 100
skipprevXpos := 167
skipprevYpos := 100
;   TIMELINE BAR
timelinebar0Xpos := 114
timelinebar0Ypos := 944
timelinebar100Xpos := 1764
timelinebar100Ypos := 944
timelinebar10Xpos := ((timelinebar100Xpos - timelinebar0Xpos) /10*1) + timelinebar0Xpos
timelinebar20Xpos := ((timelinebar100Xpos - timelinebar0Xpos) /10*2) + timelinebar0Xpos
timelinebar30Xpos := ((timelinebar100Xpos - timelinebar0Xpos) /10*3) + timelinebar0Xpos
timelinebar40Xpos := ((timelinebar100Xpos - timelinebar0Xpos) /10*4) + timelinebar0Xpos
timelinebar50Xpos := ((timelinebar100Xpos - timelinebar0Xpos) /10*5) + timelinebar0Xpos
timelinebar60Xpos := ((timelinebar100Xpos - timelinebar0Xpos) /10*6) + timelinebar0Xpos
timelinebar70Xpos := ((timelinebar100Xpos - timelinebar0Xpos) /10*7) + timelinebar0Xpos
timelinebar80Xpos := ((timelinebar100Xpos - timelinebar0Xpos) /10*8) + timelinebar0Xpos
timelinebar90Xpos := ((timelinebar100Xpos - timelinebar0Xpos) /10*9) + timelinebar0Xpos
timelinebarColorHandle := "0x0A07B2"
timelinebarColorBg := "0x3F3F3F"
;   FOOTER CONTROLS
nextepisodeXpos := 1656
nextepisodeYpos := 1024
episodesmenuXpos := 1760
episodesmenuYpos := 1024
languagesmenuXpos := 1856
languagesmenuYpos := 1024
;
;DEFINE VARIABLES...
currentView := "mainmenu"  ;can be: mainmenu, mainmenu_category, details, details_seasonSelector, movie, search, searchresults, navmenu, categoryGrid
gridTop := mainmenuGridTop
;
CoordMode, Mouse, Screen  ;Mouse coords used from here on will be absolute to the screen coordinates, not relative to the active window
#SingleInstance force ;Only one instance of script can run
#Persistent ;Make this script run indefinitely
#NoEnv
;#InstallKeybdHook 
SetTitleMatchMode 3
SetDefaultMouseSpeed, 0 ;Move the mouse instantly.
;
;checkNetflixExists:


;=======================
;--Changes by jmone-----
;=======================
; Process, Close, netflix.exe
run, explorer.exe netflix:
sleep, 1000
Loop
{
  Process, Exist, netflix.exe
  IF !errorlevel=0
    {
     run, explorer.exe netflix:
     WinActivate, Netflix
     WinMaximize, Netflix
     sleep, 1000
     Break
    }
  Else
  {
    run, explorer.exe netflix:
    sleep, 1000
    If a_index > 10
    {	Msgbox Netflix is not able to load
	ExitApp
    }
  }
}
#ifWinActive, Netflix
Click 1840,10 ; toggle full screen mode in Win10
MouseMove, %mainmenuStartXpos%, %mainmenuStartYpos%, 0  ;Move the mouse to init location

Loop
{
;startMonitoring:

  Gui +LastFound
  hWnd := WinExist()
  DllCall( "RegisterShellHookWindow", UInt,hWnd )
  MsgNum := DllCall( "RegisterWindowMessage", Str,"SHELLHOOK" )
  OnMessage( MsgNum, "ShellMessage" )
  Return
  
ShellMessage( wParam,lParam ) {
;   tooltip,% wParam "-" lParam>>16
   If ( wParam = 12 ) ;  HSHELL_APPCOMMAND := 12
      {
      HiWord:=lParam>>16
      IfEqual,HiWord,4142,SendRaw {Space}; Play
      IfEqual,HiWord,4143,SendRaw {Space}; Pause
;      IfEqual,HiWord,4145,Msgbox >>
;      IfEqual,HiWord,4146,Msgbox <<
;      IfEqual,HiWord,1,Msgbox Exit
      }      
    }
;
  Media_Stop::  ; This is the STOP button (Media_Stop) - you can change to suit your requirements
  WinClose
  Process, Close, netflix.exe
  cD = 32   ; bits (quality) - you can change to suit your requirments 
  sW = 1920 ; pixels - you can change to suit your requirments 
  sH = 1080  ; pixels - you can change to suit your requirments 
  rR = 50   ; Hz (frequency) - you can change to suit your requirments 
  ChangeDisplaySettings( cD, sW, sH, rR ) 
;  Run "C:\Program Files (x86)\J River\Media Center 20\Media Center 20.exe"
  ExitApp
  return

  0::Click 1840,10 ; toggle full screen mode in Win10
  MouseMove, %mainmenuStartXpos%, %mainmenuStartYpos%, 0  ;Move the mouse to init location
  return
;
  2:: ; If the "2" button is pressed change refresh rate to 23 or 24hz
  cD = 32   ; bits (quality) - you can change to suit your requirments 
  sW = 1920 ; pixels - you can change to suit your requirments 
  sH = 1080  ; pixels - you can change to suit your requirments 
  rR = 23   ; Hz (frequency) - you can change to suit your requirments 
  ChangeDisplaySettings( cD, sW, sH, rR ) 
  return
;
  5:: ; If the "5" button is pressed change refresh rate to 50hz
  cD = 32   ; bits (quality) - you can change to suit your requirments 
  sW = 1920 ; pixels - you can change to suit your requirments 
  sH = 1080  ; pixels - you can change to suit your requirments 
  rR = 50   ; Hz (frequency) - you can change to suit your requirments 
  ChangeDisplaySettings( cD, sW, sH, rR ) 
  return
;
  6:: ; If the "6" button is pressed change refresh rate to 60hz
  cD = 32   ; bits (quality) - you can change to suit your requirments 
  sW = 1920 ; pixels - you can change to suit your requirments 
  sH = 1080  ; pixels - you can change to suit your requirments 
  rR = 60   ; Hz (frequency) - you can change to suit your requirments 
  ChangeDisplaySettings( cD, sW, sH, rR ) 
  return
; --------------------------------------------------------
; The script that makes the DLL Call to change the resolution - Don't Change
; --------------------------------------------------------
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 ) 
}  

;=================================
;--End of Changes by jmone-----
;=================================

  Down::
    if (currentView = "details")
    {
      ;MouseMove, 0,%detailsThumbDisplacementY%, 0, R
      MouseMove, 0,%mainmenuThumbDisplacementY%, 0, R  ;TODO
    } else if (currentView = "details_seasonSelector") {
      MouseMove, 0,%seasonButtonRowHeight%, 0, R
    } else if (currentView = "navmenu") {
      MouseMove, 0,%navmenuThumbDisplacementY%, 0, R
    } else if (currentView = "categoryGrid") {
      MouseMove, 0,%categoriesThumbDisplacementY%, 0, R
    } else {
      MouseMove, 0,%mainmenuThumbDisplacementY%, 0, R
    }
    Goto, checkBounds
    return

  Up::
    if (currentView = "details")
    {
      ;MouseMove, 0,-%detailsThumbDisplacementY%, 0, R
      MouseMove, 0,-%mainmenuThumbDisplacementY%, 0, R  ;TODO
    } else if (currentView = "details_seasonSelector") {
      MouseMove, 0,-%seasonButtonRowHeight%, 0, R
    } else if (currentView = "navmenu") {
      MouseMove, 0,-%navmenuThumbDisplacementY%, 0, R
    } else if (currentView = "categoryGrid") {
      MouseMove, 0,-%categoriesThumbDisplacementY%, 0, R
    } else {
      MouseMove, 0,-%mainmenuThumbDisplacementY%, 0, R
    }
    Goto, checkBounds
    return

  Right::
    ; Move the mouse by X pixels Right from its current location:
    ;MouseMove, %mainmenuThumbDisplacementX%,0, 0, R
    MouseGetPos, mouseXpos, mouseYpos
    if (currentView = "details")
    {
      MouseMove, %detailsThumbDisplacementX%, 0, 0, R
    } else if (currentView = "details_seasonSelector") {
      
    } else if (currentView = "navmenu") {
      MouseMove, %navmenuThumbDisplacementX%, 0, 0, R
    } else if (currentView = "categoryGrid") {
      MouseMove, %categoriesThumbDisplacementX%, 0, 0, R
    } else {
      MouseMove, %mainmenuThumbDisplacementX%, 0, 0, R
    }
    Goto, checkBounds
    return

  Left::
    ; Move the mouse by X pixels Left from its current location:
    ;MouseMove, -%mainmenuThumbDisplacementX%,0, 0, R
    MouseGetPos, mouseXpos, mouseYpos
    if (currentView = "details")
    {
      MouseMove, -%detailsThumbDisplacementX%, 0, 0, R
    } else if (currentView = "details_seasonSelector") {
      
    } else if (currentView = "navmenu") {
      MouseMove, -%navmenuThumbDisplacementX%, 0, 0, R
    } else if (currentView = "categoryGrid") {
      MouseMove, -%categoriesThumbDisplacementX%, 0, 0, R
    } else {
      MouseMove, -%mainmenuThumbDisplacementX%, 0, 0, R
    }
    Goto, checkBounds
    return


  F9::
  ; Reset init pos
  MouseMove, %mainmenuStartXpos%, %mainmenuStartYpos%, 0
  return


  ENTER::
  ; Select
  ;currentView := "details" 
  ;MouseMove, %mainmenuStartXpos%, %mainmenuStartYpos%, 0
  MouseGetPos, savedXpos, savedYpos  ;save position of currently selected menu item
  Click
  if (currentView="details" and savedXpos=seasonButtonXpos and savedYpos=seasonButtonYpos)
  {
    currentView := "details_seasonSelector"
    ;MsgBox, currentView    
  } else if (currentView="details_seasonSelector") {
    currentView := "details"
    MouseMove, %detailsStartXpos%, %detailsStartYpos%, 0
  } else if (currentView="details") {
    savedDetailsXpos := savedXpos  ;save position of currently selected menu item
    savedDetailsYpos := savedYpos  ;save position of currently selected menu item
    Sleep, 100 
    currentView := "movie"
  } else if (currentView="mainmenu" and savedYpos<mainmenuGridTop) {  ;i.e. if user selected a category at top of manimenu grid
    savedMainmenuXpos := savedXpos  ;save position of currently selected menu item
    savedMainmenuYpos := savedYpos  ;save position of currently selected menu item
    Sleep, 100 
    currentView := "mainmenu_category"
    MouseMove, %mainmenuStartXpos%, %mainmenuStartYpos%, 0
  } else if (currentView="navmenu") {
    savedNavmenuXpos := savedXpos  ;save position of currently selected menu item
    savedNavmenuYpos := savedYpos  ;save position of currently selected menu item
    Sleep, 100 
    currentView := "mainmenu_category"
    MouseMove, %mainmenuStartXpos%, %mainmenuStartYpos%, 0
  } else if (currentView="categoryGrid") {
    savedCategoryXpos := savedXpos  ;save position of currently selected menu item
    savedCategoryYpos := savedYpos  ;save position of currently selected menu item
    Sleep, 100 
    currentView := "mainmenu"
    MouseMove, %mainmenuStartXpos%, %mainmenuStartYpos%, 0
  } else if (currentView="searchresults") {
    savedSearchresultsXpos := savedXpos  ;save position of currently selected menu item
    savedSearchresultsYpos := savedYpos  ;save position of currently selected menu item
    Sleep, 100 
    currentView := "details"
    MouseMove, %detailsStartXpos%, %detailsStartYpos%, 0
  } else {  ;i.e. if in "mainmenu" view...
    savedMainmenuXpos := savedXpos  ;save position of currently selected menu item
    savedMainmenuYpos := savedYpos  ;save position of currently selected menu item
    Sleep, 100      
    currentView := "details" 
    MouseMove, %detailsStartXpos%, %detailsStartYpos%, 0
  }
  return

  ;Media_Prev
  !#P::  ;  !=Alt; #=Windowskey; ^=Ctrl; +=Shift
  KeyWait, P, T0.5  ;wait for Xseconds ;NOTE: "KeyWait, Media_Prev, T1" doesnt work because it's a Media button and not a physical/logical button apparently, hence why I remapped this button!?!
  If ErrorLevel = 0
  {
    ;SHORT PRESS
    lastKeyPressed := "skipPrev" 
    Goto, GetProgress 
    return
  }
  Else
  {
    ;LONG PRESS
    ;go to timecode 0:00
    MouseGetPos, MouseX, MouseY  
    MouseMove, MouseX+1, MouseY+1, 0  ;move the mouse to make the progess bar appear
    ;Click right  ;click right mouse button to make the progess bar appear
    Sleep, 500  ;wait for UI to react/update
    jumpPos := timelinebar0Xpos
    Goto, jumpToTimelinePos
  }
  return

  Media_Next::
  lastKeyPressed := "skipNext"
  Goto, GetProgress
  return

  GetProgress:
  MouseGetPos, MouseX, MouseY  
  MouseMove, MouseX+1, MouseY+1, 0  ;move the mouse to make the progess bar appear
  ;Click right  ;click right mouse button to make the progess bar appear
  Sleep, 500  ;wait for UI to react/update
  PixelGetColor, barColor, timelinebar10Xpos, timelinebar0Ypos
  if (barColor = timelinebarColorBg) {
    barProgress := 0
    if (lastKeyPressed = "skipPrev") {
      jumpPos := timelinebar0Xpos
    } else if (lastKeyPressed = "skipNext") {
      jumpPos := timelinebar10Xpos
    }
    Goto, jumpToTimelinePos
    return
  }
  PixelGetColor, barColor, timelinebar20Xpos, timelinebar0Ypos
  if (barColor = timelinebarColorBg) {
    barProgress := 10
    if (lastKeyPressed = "skipPrev") {
      jumpPos := timelinebar0Xpos
    } else if (lastKeyPressed = "skipNext") {
      jumpPos := timelinebar20Xpos
    }
    Goto, jumpToTimelinePos
    return
  }
  PixelGetColor, barColor, timelinebar30Xpos, timelinebar0Ypos
  if (barColor = timelinebarColorBg) {
    barProgress := 20
    if (lastKeyPressed = "skipPrev") {
      jumpPos := timelinebar10Xpos
    } else if (lastKeyPressed = "skipNext") {
      jumpPos := timelinebar30Xpos
    }
    Goto, jumpToTimelinePos
    return
  }
  PixelGetColor, barColor, timelinebar40Xpos, timelinebar0Ypos
  if (barColor = timelinebarColorBg) {
    barProgress := 30
    if (lastKeyPressed = "skipPrev") {
      jumpPos := timelinebar20Xpos
    } else if (lastKeyPressed = "skipNext") {
      jumpPos := timelinebar40Xpos
    }
    Goto, jumpToTimelinePos
    return
  }
  PixelGetColor, barColor, timelinebar50Xpos, timelinebar0Ypos
  if (barColor = timelinebarColorBg) {
    barProgress := 40
    if (lastKeyPressed = "skipPrev") {
      jumpPos := timelinebar30Xpos
    } else if (lastKeyPressed = "skipNext") {
      jumpPos := timelinebar50Xpos
    }
    Goto, jumpToTimelinePos
    return
  }
  PixelGetColor, barColor, timelinebar60Xpos, timelinebar0Ypos
  if (barColor = timelinebarColorBg) {
    barProgress := 50
    if (lastKeyPressed = "skipPrev") {
      jumpPos := timelinebar40Xpos
    } else if (lastKeyPressed = "skipNext") {
      jumpPos := timelinebar60Xpos
    }
    Goto, jumpToTimelinePos
    return
  }
  PixelGetColor, barColor, timelinebar70Xpos, timelinebar0Ypos
  if (barColor = timelinebarColorBg) {
    barProgress := 60
    if (lastKeyPressed = "skipPrev") {
      jumpPos := timelinebar50Xpos
    } else if (lastKeyPressed = "skipNext") {
      jumpPos := timelinebar70Xpos
    }
    Goto, jumpToTimelinePos
    return
  }
  PixelGetColor, barColor, timelinebar80Xpos, timelinebar0Ypos
  if (barColor = timelinebarColorBg) {
    barProgress := 70
    if (lastKeyPressed = "skipPrev") {
      jumpPos := timelinebar60Xpos
    } else if (lastKeyPressed = "skipNext") {
      jumpPos := timelinebar80Xpos
    }
    Goto, jumpToTimelinePos
    return
  }
  PixelGetColor, barColor, timelinebar90Xpos, timelinebar0Ypos
  if (barColor = timelinebarColorBg) {
    barProgress := 80
    if (lastKeyPressed = "skipPrev") {
      jumpPos := timelinebar70Xpos
    } else if (lastKeyPressed = "skipNext") {
      jumpPos := timelinebar90Xpos
    }
    Goto, jumpToTimelinePos
    return
  }
  PixelGetColor, barColor, timelinebar100Xpos, timelinebar0Ypos
  if (barColor = timelinebarColorBg) {
    barProgress := 90
    if (lastKeyPressed = "skipPrev") {
      jumpPos := timelinebar80Xpos
    } else if (lastKeyPressed = "skipNext") {
      jumpPos := timelinebar100Xpos - 80  ;minus credits buffer
    }
    Goto, jumpToTimelinePos
    return
  }
  return

  jumpToTimelinePos:  
  ;MsgBox progress bar is at %barProgress%
  Click %jumpPos%, %timelinebar0Ypos%
  return

  !#I::  ;  !=Alt; #=Windowskey; ^=Ctrl; +=Shift
  ; Info button
  ;Sleep, 100
  Click %episodesmenuXpos%, %episodesmenuYpos%
  return

  Browser_Back::
  ; Back
  if (currentView = "details_seasonSelector")
  {
    Send {Escape}  ;to exit out of navMenu
    currentView := "details"
  } else if (currentView = "movie") {
    Click %backnavXpos%, %backnavYpos%
    Send {Escape}  ;to exit out of navMenu
    Sleep, 100
    MouseMove, savedDetailsXpos,savedDetailsYpos, 0
    currentView := "details"
  } else if (currentView = "searchresults") {
    Click %backnavXpos%, %backnavYpos%
    Send {Escape}  ;to exit out of navMenu
    Sleep, 100
    MouseMove, savedMainmenuXpos,savedMainmenuYpos, 0
    currentView := "mainmenu"
  } else {  ;i.e. if in "details" view, or a sub-category view in the mainmenu...
    Click %backnavXpos%, %backnavYpos%
    Send {Escape}  ;to exit out of navMenu
    Sleep, 100
    MouseMove, savedMainmenuXpos,savedMainmenuYpos, 0
    currentView := "mainmenu"
  }
  return

  !#G::  ;  !=Alt; #=Windowskey; ^=Ctrl; +=Shift
  ;MsgBox backPRessed
  ; Search
  Click %searchButtonXpos%, %searchButtonYpos%
  Sleep, 100
  MouseMove, searchresultsStartXpos, searchresultsStartYpos, 0
  currentView := "searchresults"
  return

  !#R::  ;  !=Alt; #=Windowskey; ^=Ctrl; +=Shift
  ; navmenu (accessed via Hamburger icon)
  MouseGetPos, savedMainmenuXpos, savedMainmenuYpos  ;save position of currently selected menu item
  Click %navmenuButtonXpos%, %navmenuButtonYpos%
  Sleep, 100
  MouseMove, navmenuFirstMenuButtonXpos,navmenuFirstMenuButtonYpos, 0
  currentView := "navmenu"
  return

  !#Y::  ;  !=Alt; #=Windowskey; ^=Ctrl; +=Shift
  ; categoryGrid (accessed via '-' icon in bottom right)
  MouseGetPos, savedMainmenuXpos, savedMainmenuYpos  ;save position of currently selected menu item
  Click %categoriesButtonXpos%, %categoriesButtonYpos%
  Sleep, 100
  MouseMove, categoriesFirstMenuButtonXpos,categoriesFirstMenuButtonYpos, 0
  currentView := "categoryGrid"
  return


  checkBounds:
  MouseGetPos, mouseXpos, mouseYpos
  ;MsgBox, %currentView%
  if (currentView = "details") {
    ;MsgBox, itsOnDetails
    ;gridTop = %detailsGridTop%
    if (mouseYpos < detailsGridTop) {
      MouseMove, %seasonButtonXpos%, %seasonButtonYpos%, 0
      return
    }
    if (mouseXpos < boundaryLeft) {
      ;SendRaw {Left}
        ;MouseGetPos, mouseXpos, mouseYpos
        Click %leftScrollbarXpos%, %leftScrollbarYpos%
        Click %leftScrollbarXpos%, %leftScrollbarYpos%
        Click %leftScrollbarXpos%, %leftScrollbarYpos%
        Click %leftScrollbarXpos%, %leftScrollbarYpos%
        Click %leftScrollbarXpos%, %leftScrollbarYpos%
        Click %leftScrollbarXpos%, %leftScrollbarYpos%
        Click %leftScrollbarXpos%, %leftScrollbarYpos%
        Click %leftScrollbarXpos%, %leftScrollbarYpos%
        Click %leftScrollbarXpos%, %leftScrollbarYpos%
        Click %leftScrollbarXpos%, %leftScrollbarYpos%
        Click %leftScrollbarXpos%, %leftScrollbarYpos%
        Click %leftScrollbarXpos%, %leftScrollbarYpos%
        Click %leftScrollbarXpos%, %leftScrollbarYpos%
        Click %leftScrollbarXpos%, %leftScrollbarYpos%
        Click %leftScrollbarXpos%, %leftScrollbarYpos%
        ;MouseMove, %mouseXpos%, %mouseYpos%, 0  ;move it back to where it was
      MouseMove, %boundaryLeft%, %mouseYpos%, 0  ;temp
      ;Send {PgUp}
      return
    } else if (mouseXpos > boundaryRight) {
      ;SendInput {Right}
        ;MouseGetPos, mouseXpos, mouseYpos
        Click %rightScrollbarXpos%, %rightScrollbarYpos%
        Click %rightScrollbarXpos%, %rightScrollbarYpos%
        Click %rightScrollbarXpos%, %rightScrollbarYpos%
        Click %rightScrollbarXpos%, %rightScrollbarYpos%
        Click %rightScrollbarXpos%, %rightScrollbarYpos%
        Click %rightScrollbarXpos%, %rightScrollbarYpos%
        Click %rightScrollbarXpos%, %rightScrollbarYpos%
        Click %rightScrollbarXpos%, %rightScrollbarYpos%
        Click %rightScrollbarXpos%, %rightScrollbarYpos%
        Click %rightScrollbarXpos%, %rightScrollbarYpos%
        Click %rightScrollbarXpos%, %rightScrollbarYpos%
        Click %rightScrollbarXpos%, %rightScrollbarYpos%
        Click %rightScrollbarXpos%, %rightScrollbarYpos%
        Click %rightScrollbarXpos%, %rightScrollbarYpos%
        Click %rightScrollbarXpos%, %rightScrollbarYpos%
        ;MouseMove, %mouseXpos%, %mouseYpos%, 0  ;move it back to where it was
      MouseMove, %boundaryRight%, %mouseYpos%, 0  ;temp
      ;Send {PgDn}
      return
    }    
  } else if (currentView = "navmenu") {
    
  } else {
    ;MsgBox, %currentView%    
    ;gridTop = %mainmenuGridTop%
    if (mouseYpos < mainmenuHeaderTop) {
      MouseMove, %mouseXpos%, %mainmenuHeaderTop%, 0
      return
    }
    if (mouseXpos < boundaryLeft) {
      ;SendRaw {Left}
      MouseMove, %boundaryLeft%, %mouseYpos%, 0  ;temp
      if (currentView = "mainmenu_category") {
        ;Send {PgUp}
        MouseGetPos, mouseXpos, mouseYpos
        Click %leftScrollbarXpos%, %leftScrollbarYpos%
        Click %leftScrollbarXpos%, %leftScrollbarYpos%
        Click %leftScrollbarXpos%, %leftScrollbarYpos%
        Click %leftScrollbarXpos%, %leftScrollbarYpos%
        Click %leftScrollbarXpos%, %leftScrollbarYpos%
        Click %leftScrollbarXpos%, %leftScrollbarYpos%
        Click %leftScrollbarXpos%, %leftScrollbarYpos%
        Click %leftScrollbarXpos%, %leftScrollbarYpos%
        Click %leftScrollbarXpos%, %leftScrollbarYpos%
        Click %leftScrollbarXpos%, %leftScrollbarYpos%
        MouseMove, %mouseXpos%, %mouseYpos%, 0  ;move it back to where it was
      } else {
        Click WheelLeft
      }
      return
    } else if (mouseXpos > boundaryRight) {
      ;SendInput {Right}
      MouseMove, %boundaryRight%, %mouseYpos%, 0  ;temp
      if (currentView = "mainmenu_category") {
        ;Send {PgDn}
        MouseGetPos, mouseXpos, mouseYpos
        Click %rightScrollbarXpos%, %rightScrollbarYpos%
        Click %rightScrollbarXpos%, %rightScrollbarYpos%
        Click %rightScrollbarXpos%, %rightScrollbarYpos%
        Click %rightScrollbarXpos%, %rightScrollbarYpos%
        Click %rightScrollbarXpos%, %rightScrollbarYpos%
        Click %rightScrollbarXpos%, %rightScrollbarYpos%
        Click %rightScrollbarXpos%, %rightScrollbarYpos%
        Click %rightScrollbarXpos%, %rightScrollbarYpos%
        Click %rightScrollbarXpos%, %rightScrollbarYpos%
        Click %rightScrollbarXpos%, %rightScrollbarYpos%
        MouseMove, %mouseXpos%, %mouseYpos%, 0  ;move it back to where it was
      } else {
        Click WheelRight
      }
      return
    }
  }
  return  
}
return

Last edited by jmone; 02-20-2015 at 07:44 PM.
jmone is offline  
Sponsored Links
Advertisement
 
post #122 of 135 Old 02-25-2015, 11:33 PM
Newbie
 
Join Date: Feb 2015
Posts: 8
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 0
I still use windows 7, how do you feel about windows 8?
micagordon is offline  
post #123 of 135 Old 02-26-2015, 10:25 PM
Senior Member
 
mholgate's Avatar
 
Join Date: Jun 2003
Posts: 224
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 46 Post(s)
Liked: 44
Nice job jmone!
mholgate is offline  
post #124 of 135 Old 02-28-2015, 07:00 PM
Advanced Member
 
jmone's Avatar
 
Join Date: May 2007
Posts: 521
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 11 Post(s)
Liked: 37
No Probs and thanks for the original script. Any clues on how to best manage Metro Apps as from AHK. Cross post from the AHK forum but no response:

Quote:
I'm finding it hard to do many things with Windows 8 Metro Apps and wonder what others have found (example Netflix App):
- RUN : The best I've found is "run, explorer.exe netflix:" but this is not always consistent with sometime the app starting as a background process. It would be great to be able to target the runtime directly somehow
- PROCESS: Works fine "process, Exist, netflix.exe" etc
- WinActivate / WinExist / WinMaxize etc : These don't seem to work as the windows does not have a name (according to WindowSpy it exists for a very short period and once it has run full screen there it is not visible). Any clue on how to workout if a Metro app is running full screen and is the top app?
Also if we could determine the fps of the stream we could auto switch the TV to the correct setting

Thanks
Nathan
jmone is offline  
post #125 of 135 Old 03-06-2015, 01:59 PM
Senior Member
 
mholgate's Avatar
 
Join Date: Jun 2003
Posts: 224
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 46 Post(s)
Liked: 44
Quote:
Originally Posted by jmone View Post
No Probs and thanks for the original script. Any clues on how to best manage Metro Apps as from AHK...
I just start the Netflix app from a .cmd (batch) file containing:
Code:
@echo off
"%programfiles(x86)%\cmdutils\min.exe"
start netflix://
The min.exe command minimises the batch file instantly so there's no 'flicker' of the command line window. You can get cmdutils from: paulsadowski dot com
mholgate is offline  
post #126 of 135 Old 08-02-2015, 05:27 AM
Newbie
 
engrque's Avatar
 
Join Date: Dec 2005
Location: Houston, TX
Posts: 4
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 2 Post(s)
Liked: 0
Hello all, have anyone modified the aforementioned script to work with Windows 10 version of Netflix?
engrque is offline  
post #127 of 135 Old 08-03-2015, 01:23 AM
Senior Member
 
mholgate's Avatar
 
Join Date: Jun 2003
Posts: 224
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 46 Post(s)
Liked: 44
Quote:
Originally Posted by engrque View Post
Hello all, have anyone modified the aforementioned script to work with Windows 10 version of Netflix?
Haven't upgraded to Windows 10 out of fear of losing Media Center (which, AFAIK, is the only way I can get an intuitive Live TV experience).
In your opinion, what's the Netflix Windows 10 app user experience like, compared to the Windows 8 one? I might try it out in a virtual environment

EDIT: In fact, it's pretty much the same app regardless of whether your on Windows 10 or 8, isn't it? If that's the case, one of these existing scripts should already work, depending on your settings: https://gist.github.com/holgate/01d73c6ac33ab4b6d66f or https://gist.github.com/holgate/7dcc49ef9d202a5a199e
Which one of these scripts have you tried? What's your setup?

Last edited by mholgate; 08-03-2015 at 05:30 AM. Reason: update
mholgate is offline  
post #128 of 135 Old 08-03-2015, 12:42 PM
Newbie
 
engrque's Avatar
 
Join Date: Dec 2005
Location: Houston, TX
Posts: 4
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 2 Post(s)
Liked: 0
Thanks for the reply. I don't see any discernible difference between the Netflix versions.
I have Windows 10 pro x64.
I tried running the script by changing the file extension to .exe and running it. Do I need to install the Autohotkey first and run it "as is"? If I create a restore point and restore will that reverse the process of running the script if I encounter any problems?Thanks again for your help.
engrque is offline  
post #129 of 135 Old 08-03-2015, 06:38 PM
Newbie
 
engrque's Avatar
 
Join Date: Dec 2005
Location: Houston, TX
Posts: 4
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 2 Post(s)
Liked: 0
Ok, I managed to get it working. Thanks for the great work. Is there a way to exit out of the program, without using a mouse?
engrque is offline  
post #130 of 135 Old 08-04-2015, 02:40 AM
Senior Member
 
mholgate's Avatar
 
Join Date: Jun 2003
Posts: 224
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 46 Post(s)
Liked: 44
Quote:
Originally Posted by engrque View Post
Ok, I managed to get it working. Thanks for the great work. Is there a way to exit out of the program, without using a mouse?
Exit out of Netflix, or Exit out of the script (or alternatively, stop the script running when it doesn't detect Netflix is running)? Anyway, both are possible. You'll need to modify the script (refer to the online autohotkey Docs, or google for examples on how to do this).

Also, you can convert the script to a standalone EXE file by using 'ahk2exe' which comes bundled with Autohotkey. Once you have that EXE file you can uninstall Autohotkey if you want, and still be able to run your EXE file.
mholgate is offline  
post #131 of 135 Old 08-04-2015, 03:54 AM
Newbie
 
engrque's Avatar
 
Join Date: Dec 2005
Location: Houston, TX
Posts: 4
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 2 Post(s)
Liked: 0
Quote:
Originally Posted by mholgate View Post
Exit out of Netflix, or Exit out of the script (or alternatively, stop the script running when it doesn't detect Netflix is running)? Anyway, both are possible. You'll need to modify the script (refer to the online autohotkey Docs, or google for examples on how to do this).

Also, you can convert the script to a standalone EXE file by using 'ahk2exe' which comes bundled with Autohotkey. Once you have that EXE file you can uninstall Autohotkey if you want, and still be able to run your EXE file.
Awesome thanks!
engrque is offline  
post #132 of 135 Old 09-06-2015, 10:42 AM
Senior Member
 
jmsnyc's Avatar
 
Join Date: Sep 2006
Posts: 396
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 18 Post(s)
Liked: 12
Tried both scripts in Windows 10 and does not seem to do anything to the skip forwards and reverse keys. Any suggestions ?
Resolution is 1360x768, not sure how to modfiy coordinates, should this affect key mapping ?
Thanks.

Last edited by jmsnyc; 09-06-2015 at 10:56 AM.
jmsnyc is offline  
post #133 of 135 Old 09-07-2015, 01:19 AM
Senior Member
 
mholgate's Avatar
 
Join Date: Jun 2003
Posts: 224
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 46 Post(s)
Liked: 44
Quote:
Originally Posted by jmsnyc View Post
Tried both scripts in Windows 10 and does not seem to do anything to the skip forwards and reverse keys. Any suggestions ?
Resolution is 1360x768, not sure how to modfiy coordinates, should this affect key mapping ?
Thanks.
The script does work well with the latest Netflix app in Windows 10 too.

In your case, there's two things to check:
  1. The SKIP_PREV and SKIP_NEXT buttons on your remote are likely mapped differently to mine. Pressing the Media_Prev (aka SkipPrev) button on my remote is the same as pressing the Alt-Win-P key combo - in others words, try pressing Alt-Win-P on your keyboard whilst playing a movie in Netflix and see if it performs the correct action. If it does, then you just need to change the
    Code:
    !#P::
    bit in the code to the below code or something similar.
    Code:
    Media_Prev
  2. If your resolution isn't 1920x1080 it will affect the functionality of the script, as buttons are in different pixel locations. Can you PM me/post a screengrab of your fullscreen Netflix home/movie detail view/movie playback with controls screens so I can take a look?
    You can use a utility to display the mouse pointer coordinates - such as pegtop pmeter - then move your mouse over the desired buttons in the Netflix app and make a note of the coordinates.

Last edited by mholgate; 09-07-2015 at 01:21 AM. Reason: typo
mholgate is offline  
post #134 of 135 Old 09-09-2015, 07:53 PM
Senior Member
 
jmsnyc's Avatar
 
Join Date: Sep 2006
Posts: 396
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 18 Post(s)
Liked: 12
Quote:
Originally Posted by mholgate View Post
The script does work well with the latest Netflix app in Windows 10 too.

In your case, there's two things to check:
  1. The SKIP_PREV and SKIP_NEXT buttons on your remote are likely mapped differently to mine. Pressing the Media_Prev (aka SkipPrev) button on my remote is the same as pressing the Alt-Win-P key combo - in others words, try pressing Alt-Win-P on your keyboard whilst playing a movie in Netflix and see if it performs the correct action. If it does, then you just need to change the
    Code:
    !#P::
    bit in the code to the below code or something similar.
    Code:
    Media_Prev
  2. If your resolution isn't 1920x1080 it will affect the functionality of the script, as buttons are in different pixel locations. Can you PM me/post a screengrab of your fullscreen Netflix home/movie detail view/movie playback with controls screens so I can take a look?
    You can use a utility to display the mouse pointer coordinates - such as pegtop pmeter - then move your mouse over the desired buttons in the Netflix app and make a note of the coordinates.

Thanks for your help. I also sent a PM.


Do you want the mouse positions of the navigation box that appears in the upper left of the app with the previous, play/pause, and next. Even the one on screen, only the pause/play responds to mouse click.
prev = x=168, y=101
next: x=325, y =97
I guess y is anywhere between 97 and 101

However, after looking at script it is using the progress bar,
With my lower resolution, the progress bar starts at: 88, 654 and ends at 1235, 654

Last edited by jmsnyc; 09-09-2015 at 08:09 PM.
jmsnyc is offline  
post #135 of 135 Old 09-12-2015, 02:34 PM
Senior Member
 
mholgate's Avatar
 
Join Date: Jun 2003
Posts: 224
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 46 Post(s)
Liked: 44
I've updated the tool to add the following features:
  • Windows 10 compatible (as well as Windows 8.1)
  • Multi-resolution compatible
  • Can change Episode in Playback mode using remote (experimental feature)

Make sure you quit any previous versions of the script before trying this update.

It now lives at this thread: AVSForum thread 2133042. You can find the download link there.
Please post your comments/feedback regarding this tool there, so as not to hijack this thread.
jhughy2010 likes this.
mholgate is offline  
Sponsored Links
Advertisement
 
Reply Home Theater Computers

Tags
Logitech

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off