

The routine checks that Youtube is active, and exits if it is not, it exits with a "Beep.Beep" to let you know it's closing. When #u is pressed, it checks that YouTube is active, then starts routine ScanTime, which runs twice per second. MouseMove %AdX%, %AdY% Put the mouse back where it was MouseGetPos, AdX, AdY Read the mouse position

SoundBeep beeps twice to let you know the script is exiting SetTitleMatchMode 2 this is set for the entire script file I run an AHK script all the time, so I just added this to the bottom of that script, so I can start it with a hotkey. This script doesn't recognise the dimmed version, but it doesn't need to, as it deals with the ad within half a second - long before it goes dim. If you leave the ad on screen for a period, it remains there, but goes dim. It seems to work every time, though it may need a bit of massaging to work on your PC.

It's a very simple script, but I searched the forum and couldn't find that anybody else had posted one to do the job, so maybe you'll like it. I never actually look at them for more time than is required to hit the X at the top right corner, so I wrote this script to do it automatically. The little adverts that appear on the bottom of YouTube clips irritate me.
