Picture reconize in game

Get help with using AutoHotkey and its commands and hotkeys
mixmax510
Posts: 1
Joined: 04 Dec 2019, 14:00

Picture reconize in game

04 Dec 2019, 14:53

i want so it recognizes https://imgur.com/ML42SPj if the red arrow is over the white surface (the surface does change its possition but it stays in the circle http prntscr.com /q69p6q ) and if it is
so it does click spacebar

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.


toggle := 0

return

^l::
    toggle = !toggle

    if (toggle = 0){
        SetTimer, LocCheck, Off
    }
    else{
        SetTimer, LocCheck, 2000, On
    }

return

SetTitleMatchMode 2
SetTitleMatchMode Slow


LocCheck:
{
    IfWinExist, Downloads
        {
            WinGetPos, xPos, yPos, WinWidth, WinHeight, Downloads
			CoordMode, Pixel, Screen
			endxPos := xPos + WinWidth
			endyPos := yPos + WinHeight
            ImageSearch, x, y, %xPos%, %yPos%, %endxPos%, %endyPos%, D:mypicture.PNG
            if ErrorLevel = 2
                Sendinput {space}
            else if ErrorLevel = 1
                ToolTip, Not Found, 50, 50
            else
                ToolTip, Found at %x% %y%, 50, 50
            Return
        }
}

F8::ExitApp
rakesha002
Posts: 34
Joined: 04 Dec 2017, 00:11

Re: Picture reconize in game

06 Dec 2019, 06:05

Hi,

Image file path missing "\" isn't it?
and you have "mypicture.PNG" in "D:\"
This should be D:\mypicture.PNG.

Return to “Ask For Help”

Who is online

Users browsing this forum: boiler, Google [Bot], honarjoo, ktfroy, randysejas, Toruk and 63 guests