ImageSeach not working?

Ask gaming related questions (AHK v1.1 and older)
SkrillexAkaCraft
Posts: 119
Joined: 25 Dec 2015, 10:01

ImageSeach not working?

04 Jan 2018, 13:03

when error level = 0 shit happens but the thing it should detect is there >_>

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.




Home:
Gui, Home:Add, Text, x10 y15 w60 h15, Host Name:
Gui, Home:Add, Button, x270 y85 w50 h25 gHomeGuiClose, Exit/ESC
Gui, Home:Add, Button, x220 y85 w50 h25 gStart, Start
Gui, Home:Add, Edit, x10 y30 w135 h20 vname,
Gui, Home:Add, Text, x10 y95 w125 h15, Current Host: %name%
Gui, Home:Show, w325 h113, POH Helper - V0.01
return

HomeGuiClose:
ExitApp
; This Gui is generated by X-GUI Creator



Start:
Loop
{
	Gui, Home:Submit, NoHide
ImageSearch, FoundX, FoundY, 40,40, 300, 300, %A_WorkingDir%\images\poh.png
if (ErrorLevel == 0)
{
	Send, %name%
	Send, {Enter}
	msgbox,,Image,Image Detected
}
else
ImageSearch, FoundX, FoundY, 40,40, 300, 300, %A_WorkingDir%\images\unote.png
if (ErrorLevel == 0)
{
	;;msgbox,,Image,Image Detected
	Send, {3}
}
}
return


Esc::
ExitApp
TygerByte
Posts: 96
Joined: 12 Aug 2016, 05:22

Re: ImageSeach not working?

04 Jan 2018, 18:51

Is the image a perfect match? You might consider adding the variation parameter to your image search if it's slightly off.
SkrillexAkaCraft
Posts: 119
Joined: 25 Dec 2015, 10:01

Re: ImageSeach not working?

04 Jan 2018, 19:24

TygerByte wrote:Is the image a perfect match? You might consider adding the variation parameter to your image search if it's slightly off.
the images are these


Image
but when this appears in runescape it doesn't do shit

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: golge35 and 92 guests