Skip YouTube Ads with FindText and Control-Clicking

skip YouTube adIn this tutorial I show how I adapted my use of FindText to ControClick the skip YouTube ads button. This was beneficial as it no-longer moves my mouse.  You can get my version of FindText here.

Here’s the script I wrote to skip YouTube ads

Text:="|<YouTube Skip Ads>*89$62.zzzzzzzzzzy7btzzyTyTzStyTzzbzbzbaTzzzkztztzb9cTwDUQDTtiNnzPnaNlyHaQzaRtjT7VtbjtbSNzyMSNvyxrb3zqHaSz0BtyNxatbDrvSPrSNaNnxynaRsCQa1yTa5kzzzzbzzzzzzzzztzzzzzzzzzyTzzzzzs"
loop { ;keep looping over
Sleep,500 ;sleep for 1/2 a second
ok:=FindText(0,0,150000,150000,0,0,Text) ;See if can find the image
if Ok ;if it is found, do the next line
FindText_Control_Click(Ok,X_Adj:=0,Y_Adj:=0,ahkEXE:="chrome.exe") ;Send control click to the position (note, doesn't move mouse)
If ! WinExist("ahk_class Chrome_WidgetWin_1") ;Close if no Chrome window
ExitApp ;If Chrome isn't running, exit
}
return

 

 

 

Use FindText & AutoHotkey to Skip YouTube ads

In this short video I how to use my version of FindText to easily watch for YouTube ads and skip them.

Here is the code I demonstrated.  You can get my FindText version here.

#SingleInstance,Force
SetBatchLines,-1

Text:="|<Skip YouTube Ad>*63$65.zzzzzzzzzzzzzzzzzzzzzzzwzvzzzzzzb1tzXzzzlzz81nzzzzzXzyHlbzzzzzLzwDnD6t3zwbw8TyQxk3ztDk2DwnvXXzrT763t7rDbzCSTD1mTiTDyQwyTlUzQyTtwtwznAytwzk1nsTaQxntzU3bkSAtvXXyTn740ttr0Dwzb0C3ntiEznzb2Tzzzwzzzzzzzzzztzzzzzzzzzznzzzzzzzzzzbzzzzzzzzzzzzzzzzs"
While !Ok {
    ok:=FindText(0,0,150000,150000,0,0,Text)
    Sleep, 100
    If ! WinExist("ahk_class Chrome_WidgetWin_1")  ;Close if no Chrome window
      ExitApp			
  }
FindText_Left_Click(Ok,X_Adj:=0,Y_Adj:=0,MoveBack:=1)


 

AutoHotkey Webinar- Finding and Clicking Text / Pixels / Images

AutoHotkey Webinar Resources:

Video Hour 1: High-level overview

Video Hour 2: Q&A and deep-dive into question about Encoding & Decoding images in Base64 (to prevent having to share image files)

 

Announcements:

https://the-automator.com/ahk-podcasts/

  • 030-mp3VideoGender and Programming
  • 031-mp3VideoShould you let your colleagues/boss know you’re using AutoHotkey?
  • 032-mp3VideoSecurity and plain text files

Udemy Course: Intro to AutoHotkey: https://www.udemy.com/course/intro-to-autohotkey/?couponCode=AHK-WEBINAR 

Udemy Course: Text Expansion on a PC with AutoHotkey (HotStrings) :  https://www.udemy.com/course/hotstrings-autocorrect-text-expansion-with-autohotkey/?couponCode=AHK-WEBINAR

Continue reading