Find objects

Ask gaming related questions (AHK v1.1 and older)
unpromissing
Posts: 1
Joined: 04 Apr 2024, 14:28

Find objects

04 Apr 2024, 14:30

Hi! I need to find out who the creak is, which one will trigger on the exciting object.

I used imagesearch to work with statistical pictures, so I started experimenting and asked to mark 1 pixel on the other end to draw. And, my script stopped finding this object. In general, the object that I need to find directly in the combat mission has a small transparency, moves and can be influenced by small external factors, such as a small smoke or splashes from water.

Can you tell me if there are any errors in my code? And in general, which method will be more effective in this case?

Code: Select all

a::
  imagesearch, x, y, 0, 0, 1920, 1080, *80 img.png
  msgbox, %x% - %y%
return

[Mod action: Topic moved from "AutoHotkey Development" which is for discussing the development of the AutoHotkey language, not for asking for help with your gaming scripts. Please note where your thread was moved to and post in the correct section in the future.]
User avatar
mikeyww
Posts: 27010
Joined: 09 Sep 2014, 18:38

Re: Find objects

07 Apr 2024, 07:09

Welcome to this AutoHotkey forum!

By default in AHK v1, coordinates are relative to the active window. You can use CoordMode to change the default. If your active window changes, you might be searching the wrong region. Some programs use multiple windows even without your knowledge. Clicking can change the active window.

If you are new to AHK, I recommend using its current version, which is v2, instead of this older deprecated version that is no longer developed.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 52 guests