I created a script using ImageSearch to click on a button on a web page in Chrome. Works great on my Windows 7 computer I used for testing. Moved it to my Windows 10 laptop that I want to use it on and it doesn't appear to click the image. Same version of AHK. Windows 7 vs 10. In testing it ran on my desktop vs. the new computer C:\AHK. Only difference I can think of
Code: Select all
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
SetTitleMatchMode, 1
SetTitleMatchMode, Fast
#SingleInstance force
CoordMode, Mouse, Client
;PREPARE CHROME WINDOW
WinActivate, Incident
Sleep 100
WinMaximize, Incident
Sleep 100
Send {Ctrl Down}0{Ctrl Up}
Sleep 100
ClipSaved := Clipboard ; Save User Clipboard Content
;LAUNCH REPORT
Loop, 30
{
ImageSearch, Printx, Printy, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, print_icon_target.png
If (ErrorLevel = 0)
{
%Printx%+=5
%Printy%+=5
Click, %Printx%, %Printy%
Break
}
Else
{
Sleep 1000
}
}
Any suggestions what direction I can try?