Rewind and forward YouTube video's even with outfocussed browser (Chrome). Handy for USB Wheel such as Griffin Powermate

Post your working scripts, libraries and tools
Sneeuwvos
Posts: 6
Joined: 13 Jan 2018, 05:45

Rewind and forward YouTube video's even with outfocussed browser (Chrome). Handy for USB Wheel such as Griffin Powermate

Post by Sneeuwvos » 13 Jan 2018, 05:59

Hi guys,

If you have a USB scrollwheel, such as Griffin PowerMate USB (https://viralgadgets.net/wp-content/upl ... vnqw32.jpg), and have YouTube running in a browser window somewhere, then this will be handy for you.

Normally a USB scrollwheel will only do a certain action, such as: scrolling up/down, volume up/down. But like the PowerMate USB you can also run executables. This is where AutoHotKey comes in.

On my ultra wide screen I have a browser left having YouTube open and a browser right just browsing another site. Whenever I use the wheel I always want to rewind/forward YouTube without first pressing the left browser. So these scripts do that. NetFlix and VLC still work if there is no browser with YouTube open.

Have fun!


SCRIPT FOR SCROLLING YOUTUBE BACKWARD:

Code: Select all

SetTitleMatchMode, 2
WinActivate, YouTube
Send, {Left}
SCRIPT FOR SCROLLING YOUTUBE FORWARD:

Code: Select all

SetTitleMatchMode, 2
WinActivate, YouTube
Send, {Right}
SCRIPT FOR PAUSE/PLAY YOUTUBE:

Code: Select all

SetTitleMatchMode, 2
WinActivate, YouTube
Send, {Space}

Return to “Scripts and Functions”