However, this function does not work in " Chrome ", " Internet Explorer ", or several games.
The value of the haystack and the value of the needle are well ouputted, but the value of OutputList paramter in this function does not come true and value of return number of this function is 0
Does this function work against specific windows? Still, is there any way to make it work?
This is my script for reference.
Code: Select all
SetWorkingDir, %A_WorkingDir%
#include, Gdip2.ahk
coordmode,pixel,screen
coordmode,mouse,screen
f1::
p := Gdip_Startup()
hwnd := WinExist("Google - Chrome")
pBitmapHayStack := Gdip_BitmapFromHWND(hwnd)
pBitmapNeedle := Gdip_CreateBitmapFromFile("C:\Users\me\Desktop\GoogleImage.png")
msgbox, % pBitmapHayStack "," pBitmapNeedle
result := Gdip_ImageSearch(pBitmapHayStack,pBitmapNeedle,OutputList,,,,,60,0,1,1)
msgbox, %OutputList% ;There is no value of Outpulist when running this script
msgbox, % result ; value of result is "0" when running this script
return
f2::
ExitApp