Advertisement
nagi603

AHK - youtube helper (v.1.6)

May 29th, 2021 (edited)
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; F9: marks as 'already seen'
  2. ; F8: marks as 'don't recommend'
  3. ; usage: point mouse cursor at video on youtube's 'home' page. The video portion, not any of the icons on the thumbnail, just the center
  4. ; does not work with music mixes!
  5. ; 1.4: updated to recent youtube popup-redesign in 2023 summer-ish
  6. ; 1.6: updated to check color under cursor for clicking, added more waiting for dropdown menu to appear. WILL ONLY WORK IN NIGHT MODE!
  7. ; warning: the MouseMove-s are for 3440x1440 fullscreen, so adjust those as you need.
  8. ;           1807,836 is where the "I've already seen this" checkbox pops up.
  9.  
  10.  
  11.  
  12. ; mark as "already saw" on youtube
  13. $F9::
  14. if WinActive("YouTube - Google Chrome") or WinActive("Youtube", "Chrome")
  15. {
  16.     send {Click Right}
  17.     sleep 150
  18.     send {ESC}
  19.     sleep 150
  20.     send {tab}{tab}{tab}{space}
  21.     sleep 150
  22.     send {down}{down}{down}{down}{down}{space}
  23.     MouseGetPos x, y
  24.     MouseMove 1720,723
  25.     sleep 200
  26.     send {tab}{space}
  27.     Loop
  28.         {
  29.             PixelGetColor, foundColor, 1720,723, Slow RGB
  30.             if (foundColor = 0x212121)
  31.             {
  32.                 send {Click}
  33.                 MouseMove 1807,836
  34.                 send {Click}
  35.                 sleep 50
  36.                 MouseMove %x%, %y%
  37.                 break
  38.             }
  39.             sleep 200
  40.         }
  41. }
  42. else{
  43.     send {F9}
  44. }
  45. Return
  46.  
  47. ; mark as "don't show" on youtube
  48. $F8::
  49. if WinActive("YouTube - Google Chrome") or WinActive("Youtube", "Chrome")
  50. {
  51.     send {Click Right}
  52.     sleep 200
  53.     send {ESC}
  54.     sleep 200
  55.     send {tab}{tab}{tab}{space}
  56.     sleep 300
  57.     send {down}{down}{down}{down}{down}{space}
  58. }
  59. else{
  60.     send {F8}
  61. }
  62. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement