The annoying warning:
![[Chrome] Get rid of "This type of file can harm your computer" with AHK Chrome-pdf-potentially-dangerous](https://www.howtogeek.com/wp-content/uploads/2013/04/chrome-pdf-potentially-dangerous.png)
And the solution:
Keep button image: keep_button.png
![[Chrome] Get rid of "This type of file can harm your computer" with AHK Ud8ySln](https://i.imgur.com/ud8ySln.png)
Notice: If it do not work, you have to recapture the new keep_button image instead of using above and better do it first
Good luck!
![[Chrome] Get rid of "This type of file can harm your computer" with AHK Chrome-pdf-potentially-dangerous](https://www.howtogeek.com/wp-content/uploads/2013/04/chrome-pdf-potentially-dangerous.png)
And the solution:
- Code:
SetTitleMatchMode, 2
#IfWinActive, Chrome
~LButton:: ; Change LButton to ^s or any commands you send to the Chrome to download a file
MouseGetPos, mx, my
Loop, 14
{
ImageSearch, x, y, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, D:\\Pictures\keep_button.png ; Replace The location to your image want to click
x+= 40
y+= 14
Sleep, 100
if (x != 40)
break
}
if (x != 40)
{
MouseMove, x, y
SendInput, {Click, %x%, %y%, Left, 1}
MouseMove, mx, my
}
return
#If
Keep button image: keep_button.png
![[Chrome] Get rid of "This type of file can harm your computer" with AHK Ud8ySln](https://i.imgur.com/ud8ySln.png)
Notice: If it do not work, you have to recapture the new keep_button image instead of using above and better do it first
Good luck!