Detect if color on screen and press key

Ask gaming related questions (AHK v1.1 and older)
hotlikerocky
Posts: 1
Joined: 06 Feb 2023, 23:21

Detect if color on screen and press key

Post by hotlikerocky » 06 Feb 2023, 23:27

Hello, i am new to autohotkey and i dont know much thing about it. Please help a newbie out :)
What i wanted to do is have it will search just a part of the screen like a box, if it detects the color, #582B29 it will press a key like E. (im trying to make it press e when it hits this box https://ibb.co/n334Pnq )
Last edited by gregster on 07 Feb 2023, 15:52, edited 1 time in total.
Reason: Removed "Topic is solved" from the topic name, because I assume it is not, but it was copied from an old topic :-] (see below).

User avatar
mikeyww
Posts: 26601
Joined: 09 Sep 2014, 18:38

Re: Detect if color on screen and press key Topic is solved

Post by mikeyww » 07 Feb 2023, 15:14

Welcome to this AutoHotkey forum!

Here is a way to get started: https://www.autohotkey.com/docs/v2/lib/PixelSearch.htm#ExBasic

You can use the :arrow: Send function instead of a MsgBox.


Post Reply

Return to “Gaming Help (v1)”