Hello so i need to start working on a project and i need help.
First i need to detect a picture on my screen
second when i press ALT my mouse cursor will aim on that picture
thats all i need can anyone help?
detecting a picture Topic is solved
-
- Posts: 57
- Joined: 09 Oct 2017, 13:34
-
- Posts: 57
- Joined: 09 Oct 2017, 13:34
Re: detecting a picture
HELLO ANYONE HERE XD ?
Re: detecting a picture Topic is solved
First you will want to read the docs on ImageSearch
Here's an example
Here's an example
Code: Select all
#if foundImage ;the below hotkey only works if an image was found
alt::
mousemove,foundX,foundY
foundImage := false ;disables hotkey, until next time you find an image
return
#if
f1:: ;press f1 to scan for image.png
ImageSearch, FoundX, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, *50 image.png ;search the entire screen, using image.png with a shade variance of 50 pixels
if (errorlevel = 0) {
foundImage := true
} else {
foundImage := false
}
return
Last edited by Spawnova on 19 Nov 2017, 18:35, edited 1 time in total.
Some of my AHK programs: 3D Voxel Game - Platformer Game
GitHub projects : Image/Pixel scanning class - Direct2D overlay class
GitHub projects : Image/Pixel scanning class - Direct2D overlay class
-
- Posts: 57
- Joined: 09 Oct 2017, 13:34
Re: detecting a picture
Tanks man i will try
Who is online
Users browsing this forum: No registered users and 39 guests