Hi ,
I was trying to use image search function on specific window in this case it is google chrome
but image search area isnt working it still searches the image with respect to desktop screen not with respect to google chrome window
here is my code
#include <ImageSearch.au3>
#include <MsgBoxConstants.au3>
Opt("CaretCoordMode", 2)
Opt("MouseCoordMode", 2)
HotKeySet("p", "checkForImage")
HotKeySet("q", "closei")
global $y = 0, $x = 0
Func checkForImage()
WinActivate("[CLASS:Chrome_WidgetWin_1]","")
Sleep(500)
local $search = _ImageSearchArea('D:\autoit progs\on1.bmp',1,490,177,610,227,$x,$y ,80)
If $search = 1 Then
MouseMove(537, 197, 10)
MsgBox($MB_SYSTEMMODAL ,"Image", "Found")
Else
MsgBox($MB_SYSTEMMODAL , "Image" ,"Not Found")
EndIf
EndFunc
Func closei()
Exit
EndFunc
while 1
sleep(200)
WEnd
Help is appreciated