Skip to content

Instantly share code, notes, and snippets.

@JoeGlines
Last active August 21, 2024 22:42
Show Gist options
  • Save JoeGlines/06a938ffed2f73353cc2f0eb8f295bb3 to your computer and use it in GitHub Desktop.
Save JoeGlines/06a938ffed2f73353cc2f0eb8f295bb3 to your computer and use it in GitHub Desktop.
;*******************************************************
; Want a clear path for learning AutoHotkey; Take a look at our AutoHotkey Udemy courses. They're structured in a way to make learning AHK EASY
; Right now you can get a coupon code here: https://the-Automator.com/Learn
;*******************************************************
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment