Gdip_Imagesearch

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Parama
Posts: 40
Joined: 27 Sep 2017, 22:38

Gdip_Imagesearch

20 Oct 2017, 18:12

I am familiar with this function.
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

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 211 guests