SHARE
TWEET

NetflixRemote

a guest Nov 14th, 2014 1,939 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;DEFINE CONSTANTS...
  2. ;
  3. ;
  4. ; Global value settings that are independant to display-size...
  5. ;
  6. ; MAIN MENU
  7. boundaryLeft := 120
  8. boundaryRight := 1800
  9. leftScrollbarXpos := 28
  10. leftScrollbarYpos := 1065
  11. rightScrollbarXpos := 1891
  12. rightScrollbarYpos := 1065
  13. ;
  14.  
  15.  
  16.  
  17. ; For 1920x1080px displays, with "Change the Size of Apps on the screen" set to "Default"...
  18. ;
  19. ; MAIN MENU
  20. mainmenuHeaderTop := 140 ;top categories text start Y pos
  21. mainmenuGridTop := 182 ;top thumbs start Y pos
  22. mainmenuStartXpos := 800 ; init X position
  23. mainmenuStartYpos := 350 ; init Y position
  24. mainmenuThumbDisplacementX := 141
  25. mainmenuThumbDisplacementY := 196
  26. ; SEARCH MENU
  27. searchButtonXpos := 1718
  28. searchButtonYpos := 70
  29. ; SEARCH RESULTS
  30. searchresultsStartXpos := 560 ; init X position
  31. searchresultsStartYpos := 265 ; init Y position
  32. ; NAV MENU
  33. navmenuButtonXpos := 1646
  34. navmenuButtonYpos := 69
  35. navmenuFirstMenuButtonXpos := 156
  36. navmenuFirstMenuButtonYpos := 63
  37. navmenuThumbDisplacementX := 267
  38. navmenuThumbDisplacementY := 44
  39. ; CATEGORIES MENU
  40. categoriesButtonXpos := 1900
  41. categoriesButtonYpos := 1047
  42. categoriesFirstMenuButtonXpos := 174
  43. categoriesFirstMenuButtonYpos := 304
  44. categoriesThumbDisplacementX := 195
  45. categoriesThumbDisplacementY := 265
  46. ; DETAILS PAGE
  47. backnavXpos := 38 ; top back nav button X pos
  48. backnavYpos := 68 ; top back nav button Y pos
  49. seasonButtonXpos := 228
  50. seasonButtonYpos := 368
  51. seasonButtonRowHeight := 46
  52. detailsHeaderTop := 368 ;top season selector button start Y pos
  53. detailsGridTop := 416 ;top thumbs start Y pos
  54. detailsStartXpos := 268 ; init X position
  55. detailsStartYpos := 518 ; init Y position
  56. detailsThumbDisplacementX := 381
  57. detailsThumbDisplacementY := 0
  58. ; PLAYING MEDIA
  59. ; SKIP/NAV CONTROLS
  60. skipnextXpos := 330
  61. skipnextYpos := 100
  62. skipprevXpos := 167
  63. skipprevYpos := 100
  64. ; TIMELINE BAR
  65. timelinebar0Xpos := 114
  66. timelinebar0Ypos := 944
  67. timelinebar100Xpos := 1764
  68. timelinebar100Ypos := 944
  69. timelinebar10Xpos := ((timelinebar100Xpos - timelinebar0Xpos) /10*1) + timelinebar0Xpos
  70. timelinebar20Xpos := ((timelinebar100Xpos - timelinebar0Xpos) /10*2) + timelinebar0Xpos
  71. timelinebar30Xpos := ((timelinebar100Xpos - timelinebar0Xpos) /10*3) + timelinebar0Xpos
  72. timelinebar40Xpos := ((timelinebar100Xpos - timelinebar0Xpos) /10*4) + timelinebar0Xpos
  73. timelinebar50Xpos := ((timelinebar100Xpos - timelinebar0Xpos) /10*5) + timelinebar0Xpos
  74. timelinebar60Xpos := ((timelinebar100Xpos - timelinebar0Xpos) /10*6) + timelinebar0Xpos
  75. timelinebar70Xpos := ((timelinebar100Xpos - timelinebar0Xpos) /10*7) + timelinebar0Xpos
  76. timelinebar80Xpos := ((timelinebar100Xpos - timelinebar0Xpos) /10*8) + timelinebar0Xpos
  77. timelinebar90Xpos := ((timelinebar100Xpos - timelinebar0Xpos) /10*9) + timelinebar0Xpos
  78. timelinebarColorHandle := "0x0A07B2"
  79. timelinebarColorBg := "0x3F3F3F"
  80. ; FOOTER CONTROLS
  81. nextepisodeXpos := 1656
  82. nextepisodeYpos := 1024
  83. episodesmenuXpos := 1760
  84. episodesmenuYpos := 1024
  85. languagesmenuXpos := 1856
  86. languagesmenuYpos := 1024
  87. ;
  88.  
  89.  
  90. ;DEFINE VARIABLES...
  91. currentView := "mainmenu" ;can be: mainmenu, mainmenu_category, details, details_seasonSelector, movie, search, searchresults, navmenu, categoryGrid
  92. gridTop := mainmenuGridTop
  93.  
  94. ;
  95. ;
  96. CoordMode, Mouse, Screen ;Mouse coords used from here on will be absolute to the screen coordinates, not relative to the active window
  97. #SingleInstance force ;Only one instance of script can run
  98. #Persistent ;Make this script run indefinitely
  99. #NoEnv
  100. ;#InstallKeybdHook
  101. SetTitleMatchMode 3
  102. SetDefaultMouseSpeed, 0 ;Move the mouse instantly.
  103.  
  104. ;SetTimer, checkNetflixExists, 2000
  105. ;return
  106.  
  107. ;checkNetflixExists:
  108. #ifWinActive, Netflix
  109. ;IfWinNotActive, Netflix, , WinActivate, Netflix,
  110. ;WinWait, Netflix
  111. ;WinWaitActive, Netflix,
  112. ;{
  113. MouseMove, %mainmenuStartXpos%, %mainmenuStartYpos%, 0 ;Move the mouse to init location
  114. ;SetTimer, WatchCursor, 1000
  115.  
  116. ;settimer startMonitoring, 100 ;Run this function pretty much instantly straight afterwards
  117. ;return
  118. Loop
  119. {
  120. ;startMonitoring:
  121.  
  122.  
  123. Down::
  124. if (currentView = "details")
  125. {
  126. ;MouseMove, 0,%detailsThumbDisplacementY%, 0, R
  127. MouseMove, 0,%mainmenuThumbDisplacementY%, 0, R ;TODO
  128. } else if (currentView = "details_seasonSelector") {
  129. MouseMove, 0,%seasonButtonRowHeight%, 0, R
  130. } else if (currentView = "navmenu") {
  131. MouseMove, 0,%navmenuThumbDisplacementY%, 0, R
  132. } else if (currentView = "categoryGrid") {
  133. MouseMove, 0,%categoriesThumbDisplacementY%, 0, R
  134. } else {
  135. MouseMove, 0,%mainmenuThumbDisplacementY%, 0, R
  136. }
  137. Goto, checkBounds
  138. return
  139.  
  140. Up::
  141. if (currentView = "details")
  142. {
  143. ;MouseMove, 0,-%detailsThumbDisplacementY%, 0, R
  144. MouseMove, 0,-%mainmenuThumbDisplacementY%, 0, R ;TODO
  145. } else if (currentView = "details_seasonSelector") {
  146. MouseMove, 0,-%seasonButtonRowHeight%, 0, R
  147. } else if (currentView = "navmenu") {
  148. MouseMove, 0,-%navmenuThumbDisplacementY%, 0, R
  149. } else if (currentView = "categoryGrid") {
  150. MouseMove, 0,-%categoriesThumbDisplacementY%, 0, R
  151. } else {
  152. MouseMove, 0,-%mainmenuThumbDisplacementY%, 0, R
  153. }
  154. Goto, checkBounds
  155. return
  156.  
  157. Right::
  158. ; Move the mouse by X pixels Right from its current location:
  159. ;MouseMove, %mainmenuThumbDisplacementX%,0, 0, R
  160. MouseGetPos, mouseXpos, mouseYpos
  161. if (currentView = "details")
  162. {
  163. MouseMove, %detailsThumbDisplacementX%, 0, 0, R
  164. } else if (currentView = "details_seasonSelector") {
  165. } else if (currentView = "navmenu") {
  166. MouseMove, %navmenuThumbDisplacementX%, 0, 0, R
  167. } else if (currentView = "categoryGrid") {
  168. MouseMove, %categoriesThumbDisplacementX%, 0, 0, R
  169. } else {
  170. MouseMove, %mainmenuThumbDisplacementX%, 0, 0, R
  171. }
  172. Goto, checkBounds
  173. return
  174.  
  175. Left::
  176. ; Move the mouse by X pixels Left from its current location:
  177. ;MouseMove, -%mainmenuThumbDisplacementX%,0, 0, R
  178. MouseGetPos, mouseXpos, mouseYpos
  179. if (currentView = "details")
  180. {
  181. MouseMove, -%detailsThumbDisplacementX%, 0, 0, R
  182. } else if (currentView = "details_seasonSelector") {
  183. } else if (currentView = "navmenu") {
  184. MouseMove, -%navmenuThumbDisplacementX%, 0, 0, R
  185. } else if (currentView = "categoryGrid") {
  186. MouseMove, -%categoriesThumbDisplacementX%, 0, 0, R
  187. } else {
  188. MouseMove, -%mainmenuThumbDisplacementX%, 0, 0, R
  189. }
  190. Goto, checkBounds
  191. return
  192.  
  193.  
  194. F9::
  195. ; Reset init pos
  196. MouseMove, %mainmenuStartXpos%, %mainmenuStartYpos%, 0
  197. return
  198.  
  199. ENTER::
  200. ; Select
  201. ;currentView := "details"
  202. ;MouseMove, %mainmenuStartXpos%, %mainmenuStartYpos%, 0
  203. MouseGetPos, savedXpos, savedYpos ;save position of currently selected menu item
  204. Click
  205. if (currentView="details" and savedXpos=seasonButtonXpos and savedYpos=seasonButtonYpos)
  206. {
  207. currentView := "details_seasonSelector"
  208. ;MsgBox, currentView
  209. } else if (currentView="details_seasonSelector") {
  210. currentView := "details"
  211. MouseMove, %detailsStartXpos%, %detailsStartYpos%, 0
  212. } else if (currentView="details") {
  213. savedDetailsXpos := savedXpos ;save position of currently selected menu item
  214. savedDetailsYpos := savedYpos ;save position of currently selected menu item
  215. Sleep, 100
  216. currentView := "movie"
  217. } else if (currentView="mainmenu" and savedYpos<mainmenuGridTop) { ;i.e. if user selected a category at top of manimenu grid
  218. savedMainmenuXpos := savedXpos ;save position of currently selected menu item
  219. savedMainmenuYpos := savedYpos ;save position of currently selected menu item
  220. Sleep, 100
  221. currentView := "mainmenu_category"
  222. MouseMove, %mainmenuStartXpos%, %mainmenuStartYpos%, 0
  223. } else if (currentView="navmenu") {
  224. savedNavmenuXpos := savedXpos ;save position of currently selected menu item
  225. savedNavmenuYpos := savedYpos ;save position of currently selected menu item
  226. Sleep, 100
  227. currentView := "mainmenu_category"
  228. MouseMove, %mainmenuStartXpos%, %mainmenuStartYpos%, 0
  229. } else if (currentView="categoryGrid") {
  230. savedCategoryXpos := savedXpos ;save position of currently selected menu item
  231. savedCategoryYpos := savedYpos ;save position of currently selected menu item
  232. Sleep, 100
  233. currentView := "mainmenu"
  234. MouseMove, %mainmenuStartXpos%, %mainmenuStartYpos%, 0
  235. } else if (currentView="searchresults") {
  236. savedSearchresultsXpos := savedXpos ;save position of currently selected menu item
  237. savedSearchresultsYpos := savedYpos ;save position of currently selected menu item
  238. Sleep, 100
  239. currentView := "details"
  240. MouseMove, %detailsStartXpos%, %detailsStartYpos%, 0
  241. } else { ;i.e. if in "mainmenu" view...
  242. savedMainmenuXpos := savedXpos ;save position of currently selected menu item
  243. savedMainmenuYpos := savedYpos ;save position of currently selected menu item
  244. Sleep, 100
  245. currentView := "details"
  246. MouseMove, %detailsStartXpos%, %detailsStartYpos%, 0
  247. }
  248. return
  249.  
  250. ;Media_Prev::
  251. ; Skip_Next
  252. ;Sleep, 100
  253. ;Click %timelinebar0Xpos%, %timelinebar0Ypos%
  254. ;Sleep, 100
  255. ;Click %timelinebar0Xpos%, %timelinebar0Ypos%
  256. ;return
  257.  
  258. ;Media_Next::
  259. ; Skip_Next
  260. ;Sleep, 100
  261. ;Click %skipnextXpos%, %skipnextYpos%
  262. ;return
  263.  
  264. ;Media_Prev
  265. !#P:: ; !=Alt; #=Windowskey; ^=Ctrl; +=Shift
  266. 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!?!
  267. If ErrorLevel = 0
  268. {
  269. ;SHORT PRESS
  270. lastKeyPressed := "skipPrev"
  271. Goto, GetProgress
  272. return
  273. }
  274. Else
  275. {
  276. ;LONG PRESS
  277. ;go to timecode 0:00
  278. MouseGetPos, MouseX, MouseY
  279. MouseMove, MouseX+1, MouseY+1, 0 ;move the mouse to make the progess bar appear
  280. ;Click right ;click right mouse button to make the progess bar appear
  281. Sleep, 500 ;wait for UI to react/update
  282. jumpPos := timelinebar0Xpos
  283. Goto, jumpToTimelinePos
  284. }
  285. return
  286.  
  287. Media_Next::
  288. lastKeyPressed := "skipNext"
  289. Goto, GetProgress
  290. return
  291.  
  292. GetProgress:
  293. MouseGetPos, MouseX, MouseY
  294. MouseMove, MouseX+1, MouseY+1, 0 ;move the mouse to make the progess bar appear
  295. ;Click right ;click right mouse button to make the progess bar appear
  296. Sleep, 500 ;wait for UI to react/update
  297. PixelGetColor, barColor, timelinebar10Xpos, timelinebar0Ypos
  298. if (barColor = timelinebarColorBg) {
  299. barProgress := 0
  300. if (lastKeyPressed = "skipPrev") {
  301. jumpPos := timelinebar0Xpos
  302. } else if (lastKeyPressed = "skipNext") {
  303. jumpPos := timelinebar10Xpos
  304. }
  305. Goto, jumpToTimelinePos
  306. return
  307. }
  308. PixelGetColor, barColor, timelinebar20Xpos, timelinebar0Ypos
  309. if (barColor = timelinebarColorBg) {
  310. barProgress := 10
  311. if (lastKeyPressed = "skipPrev") {
  312. jumpPos := timelinebar0Xpos
  313. } else if (lastKeyPressed = "skipNext") {
  314. jumpPos := timelinebar20Xpos
  315. }
  316. Goto, jumpToTimelinePos
  317. return
  318. }
  319. PixelGetColor, barColor, timelinebar30Xpos, timelinebar0Ypos
  320. if (barColor = timelinebarColorBg) {
  321. barProgress := 20
  322. if (lastKeyPressed = "skipPrev") {
  323. jumpPos := timelinebar10Xpos
  324. } else if (lastKeyPressed = "skipNext") {
  325. jumpPos := timelinebar30Xpos
  326. }
  327. Goto, jumpToTimelinePos
  328. return
  329. }
  330. PixelGetColor, barColor, timelinebar40Xpos, timelinebar0Ypos
  331. if (barColor = timelinebarColorBg) {
  332. barProgress := 30
  333. if (lastKeyPressed = "skipPrev") {
  334. jumpPos := timelinebar20Xpos
  335. } else if (lastKeyPressed = "skipNext") {
  336. jumpPos := timelinebar40Xpos
  337. }
  338. Goto, jumpToTimelinePos
  339. return
  340. }
  341. PixelGetColor, barColor, timelinebar50Xpos, timelinebar0Ypos
  342. if (barColor = timelinebarColorBg) {
  343. barProgress := 40
  344. if (lastKeyPressed = "skipPrev") {
  345. jumpPos := timelinebar30Xpos
  346. } else if (lastKeyPressed = "skipNext") {
  347. jumpPos := timelinebar50Xpos
  348. }
  349. Goto, jumpToTimelinePos
  350. return
  351. }
  352. PixelGetColor, barColor, timelinebar60Xpos, timelinebar0Ypos
  353. if (barColor = timelinebarColorBg) {
  354. barProgress := 50
  355. if (lastKeyPressed = "skipPrev") {
  356. jumpPos := timelinebar40Xpos
  357. } else if (lastKeyPressed = "skipNext") {
  358. jumpPos := timelinebar60Xpos
  359. }
  360. Goto, jumpToTimelinePos
  361. return
  362. }
  363. PixelGetColor, barColor, timelinebar70Xpos, timelinebar0Ypos
  364. if (barColor = timelinebarColorBg) {
  365. barProgress := 60
  366. if (lastKeyPressed = "skipPrev") {
  367. jumpPos := timelinebar50Xpos
  368. } else if (lastKeyPressed = "skipNext") {
  369. jumpPos := timelinebar70Xpos
  370. }
  371. Goto, jumpToTimelinePos
  372. return
  373. }
  374. PixelGetColor, barColor, timelinebar80Xpos, timelinebar0Ypos
  375. if (barColor = timelinebarColorBg) {
  376. barProgress := 70
  377. if (lastKeyPressed = "skipPrev") {
  378. jumpPos := timelinebar60Xpos
  379. } else if (lastKeyPressed = "skipNext") {
  380. jumpPos := timelinebar80Xpos
  381. }
  382. Goto, jumpToTimelinePos
  383. return
  384. }
  385. PixelGetColor, barColor, timelinebar90Xpos, timelinebar0Ypos
  386. if (barColor = timelinebarColorBg) {
  387. barProgress := 80
  388. if (lastKeyPressed = "skipPrev") {
  389. jumpPos := timelinebar70Xpos
  390. } else if (lastKeyPressed = "skipNext") {
  391. jumpPos := timelinebar90Xpos
  392. }
  393. Goto, jumpToTimelinePos
  394. return
  395. }
  396. PixelGetColor, barColor, timelinebar100Xpos, timelinebar0Ypos
  397. if (barColor = timelinebarColorBg) {
  398. barProgress := 90
  399. if (lastKeyPressed = "skipPrev") {
  400. jumpPos := timelinebar80Xpos
  401. } else if (lastKeyPressed = "skipNext") {
  402. jumpPos := timelinebar100Xpos - 80 ;minus credits buffer
  403. }
  404. Goto, jumpToTimelinePos
  405. return
  406. }
  407. return
  408.  
  409. jumpToTimelinePos:
  410. ;MsgBox progress bar is at %barProgress%
  411. Click %jumpPos%, %timelinebar0Ypos%
  412. return
  413.  
  414. ;timelinebar90Xpos
  415. ;timelinebarColorHandle
  416. ;timelinebarColorBg
  417. ; Next Episode
  418. ;Sleep, 100
  419. ;Click %nextepisodeXpos%, %nextepisodeYpos%
  420. ;return
  421.  
  422. !#I:: ; !=Alt; #=Windowskey; ^=Ctrl; +=Shift
  423. ; Info button
  424. ;Sleep, 100
  425. Click %episodesmenuXpos%, %episodesmenuYpos%
  426. return
  427.  
  428. Browser_Back::
  429. ; Back
  430. if (currentView = "details_seasonSelector")
  431. {
  432. Send {Escape} ;to exit out of navMenu
  433. currentView := "details"
  434. } else if (currentView = "movie") {
  435. Click %backnavXpos%, %backnavYpos%
  436. Send {Escape} ;to exit out of navMenu
  437. Sleep, 100
  438. MouseMove, savedDetailsXpos,savedDetailsYpos, 0
  439. currentView := "details"
  440. } else if (currentView = "searchresults") {
  441. Click %backnavXpos%, %backnavYpos%
  442. Send {Escape} ;to exit out of navMenu
  443. Sleep, 100
  444. MouseMove, savedMainmenuXpos,savedMainmenuYpos, 0
  445. currentView := "mainmenu"
  446. } else { ;i.e. if in "details" view, or a sub-category view in the mainmenu...
  447. Click %backnavXpos%, %backnavYpos%
  448. Send {Escape} ;to exit out of navMenu
  449. Sleep, 100
  450. MouseMove, savedMainmenuXpos,savedMainmenuYpos, 0
  451. currentView := "mainmenu"
  452. }
  453. return
  454.  
  455. !#G:: ; !=Alt; #=Windowskey; ^=Ctrl; +=Shift
  456. ;MsgBox backPRessed
  457. ; Search
  458. Click %searchButtonXpos%, %searchButtonYpos%
  459. Sleep, 100
  460. MouseMove, searchresultsStartXpos, searchresultsStartYpos, 0
  461. currentView := "searchresults"
  462. return
  463.  
  464. !#R:: ; !=Alt; #=Windowskey; ^=Ctrl; +=Shift
  465. ; navmenu (accessed via Hamburger icon)
  466. MouseGetPos, savedMainmenuXpos, savedMainmenuYpos ;save position of currently selected menu item
  467. Click %navmenuButtonXpos%, %navmenuButtonYpos%
  468. Sleep, 100
  469. MouseMove, navmenuFirstMenuButtonXpos,navmenuFirstMenuButtonYpos, 0
  470. currentView := "navmenu"
  471. return
  472.  
  473. !#Y:: ; !=Alt; #=Windowskey; ^=Ctrl; +=Shift
  474. ; categoryGrid (accessed via '-' icon in bottom right)
  475. MouseGetPos, savedMainmenuXpos, savedMainmenuYpos ;save position of currently selected menu item
  476. Click %categoriesButtonXpos%, %categoriesButtonYpos%
  477. Sleep, 100
  478. MouseMove, categoriesFirstMenuButtonXpos,categoriesFirstMenuButtonYpos, 0
  479. currentView := "categoryGrid"
  480. return
  481.  
  482.  
  483. checkBounds:
  484. MouseGetPos, mouseXpos, mouseYpos
  485. ;MsgBox, %currentView%
  486. if (currentView = "details") {
  487. ;MsgBox, itsOnDetails
  488. ;gridTop = %detailsGridTop%
  489. if (mouseYpos < detailsGridTop) {
  490. MouseMove, %seasonButtonXpos%, %seasonButtonYpos%, 0
  491. return
  492. }
  493. if (mouseXpos < boundaryLeft) {
  494. ;SendRaw {Left}
  495. ;MouseGetPos, mouseXpos, mouseYpos
  496. Click %leftScrollbarXpos%, %leftScrollbarYpos%
  497. Click %leftScrollbarXpos%, %leftScrollbarYpos%
  498. Click %leftScrollbarXpos%, %leftScrollbarYpos%
  499. Click %leftScrollbarXpos%, %leftScrollbarYpos%
  500. Click %leftScrollbarXpos%, %leftScrollbarYpos%
  501. Click %leftScrollbarXpos%, %leftScrollbarYpos%
  502. Click %leftScrollbarXpos%, %leftScrollbarYpos%
  503. Click %leftScrollbarXpos%, %leftScrollbarYpos%
  504. Click %leftScrollbarXpos%, %leftScrollbarYpos%
  505. Click %leftScrollbarXpos%, %leftScrollbarYpos%
  506. Click %leftScrollbarXpos%, %leftScrollbarYpos%
  507. Click %leftScrollbarXpos%, %leftScrollbarYpos%
  508. Click %leftScrollbarXpos%, %leftScrollbarYpos%
  509. Click %leftScrollbarXpos%, %leftScrollbarYpos%
  510. Click %leftScrollbarXpos%, %leftScrollbarYpos%
  511. ;MouseMove, %mouseXpos%, %mouseYpos%, 0 ;move it back to where it was
  512. MouseMove, %boundaryLeft%, %mouseYpos%, 0 ;temp
  513. ;Send {PgUp}
  514. return
  515. } else if (mouseXpos > boundaryRight) {
  516. ;SendInput {Right}
  517. ;MouseGetPos, mouseXpos, mouseYpos
  518. Click %rightScrollbarXpos%, %rightScrollbarYpos%
  519. Click %rightScrollbarXpos%, %rightScrollbarYpos%
  520. Click %rightScrollbarXpos%, %rightScrollbarYpos%
  521. Click %rightScrollbarXpos%, %rightScrollbarYpos%
  522. Click %rightScrollbarXpos%, %rightScrollbarYpos%
  523. Click %rightScrollbarXpos%, %rightScrollbarYpos%
  524. Click %rightScrollbarXpos%, %rightScrollbarYpos%
  525. Click %rightScrollbarXpos%, %rightScrollbarYpos%
  526. Click %rightScrollbarXpos%, %rightScrollbarYpos%
  527. Click %rightScrollbarXpos%, %rightScrollbarYpos%
  528. Click %rightScrollbarXpos%, %rightScrollbarYpos%
  529. Click %rightScrollbarXpos%, %rightScrollbarYpos%
  530. Click %rightScrollbarXpos%, %rightScrollbarYpos%
  531. Click %rightScrollbarXpos%, %rightScrollbarYpos%
  532. Click %rightScrollbarXpos%, %rightScrollbarYpos%
  533. ;MouseMove, %mouseXpos%, %mouseYpos%, 0 ;move it back to where it was
  534. MouseMove, %boundaryRight%, %mouseYpos%, 0 ;temp
  535. ;Send {PgDn}
  536. return
  537. }
  538. } else if (currentView = "navmenu") {
  539. } else {
  540. ;MsgBox, %currentView%
  541. ;gridTop = %mainmenuGridTop%
  542. if (mouseYpos < mainmenuHeaderTop) {
  543. MouseMove, %mouseXpos%, %mainmenuHeaderTop%, 0
  544. return
  545. }
  546. if (mouseXpos < boundaryLeft) {
  547. ;SendRaw {Left}
  548. MouseMove, %boundaryLeft%, %mouseYpos%, 0 ;temp
  549. if (currentView = "mainmenu_category") {
  550. ;Send {PgUp}
  551. MouseGetPos, mouseXpos, mouseYpos
  552. Click %leftScrollbarXpos%, %leftScrollbarYpos%
  553. Click %leftScrollbarXpos%, %leftScrollbarYpos%
  554. Click %leftScrollbarXpos%, %leftScrollbarYpos%
  555. Click %leftScrollbarXpos%, %leftScrollbarYpos%
  556. Click %leftScrollbarXpos%, %leftScrollbarYpos%
  557. Click %leftScrollbarXpos%, %leftScrollbarYpos%
  558. Click %leftScrollbarXpos%, %leftScrollbarYpos%
  559. Click %leftScrollbarXpos%, %leftScrollbarYpos%
  560. Click %leftScrollbarXpos%, %leftScrollbarYpos%
  561. Click %leftScrollbarXpos%, %leftScrollbarYpos%
  562. MouseMove, %mouseXpos%, %mouseYpos%, 0 ;move it back to where it was
  563. } else {
  564. Click WheelLeft
  565. }
  566. return
  567. } else if (mouseXpos > boundaryRight) {
  568. ;SendInput {Right}
  569. MouseMove, %boundaryRight%, %mouseYpos%, 0 ;temp
  570. if (currentView = "mainmenu_category") {
  571. ;Send {PgDn}
  572. MouseGetPos, mouseXpos, mouseYpos
  573. Click %rightScrollbarXpos%, %rightScrollbarYpos%
  574. Click %rightScrollbarXpos%, %rightScrollbarYpos%
  575. Click %rightScrollbarXpos%, %rightScrollbarYpos%
  576. Click %rightScrollbarXpos%, %rightScrollbarYpos%
  577. Click %rightScrollbarXpos%, %rightScrollbarYpos%
  578. Click %rightScrollbarXpos%, %rightScrollbarYpos%
  579. Click %rightScrollbarXpos%, %rightScrollbarYpos%
  580. Click %rightScrollbarXpos%, %rightScrollbarYpos%
  581. Click %rightScrollbarXpos%, %rightScrollbarYpos%
  582. Click %rightScrollbarXpos%, %rightScrollbarYpos%
  583. MouseMove, %mouseXpos%, %mouseYpos%, 0 ;move it back to where it was
  584. } else {
  585. Click WheelRight
  586. }
  587. return
  588. }
  589. }
  590. return
  591.  
  592. ;#ifWinActive
  593. ;Esc::ExitApp
  594. ;Sleep, 1000 ; 1 second
  595.  
  596. }
  597. return
  598.  
  599. ;WatchCursor:
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top