Help with a % of area script

Get help with using AutoHotkey and its commands and hotkeys
derpybaits
Posts: 9
Joined: 22 Dec 2018, 03:14

Help with a % of area script

07 Jul 2019, 15:05

So I have a area on the screen that is red and every so often there is a black bar that comes down to cover a part of it from the top down. What I want to do is notice when a % of the area is in black and do a action when that happens. Is that possible.
TomL
Posts: 16
Joined: 12 Jan 2016, 21:02

Re: Help with a % of area script

07 Jul 2019, 17:45

If the area is always visible on the screen, the PixelGetColor command will return the color of a specified pixel on the screen. Your script can periodically check the pixel's color and take action when it changes.
derpybaits
Posts: 9
Joined: 22 Dec 2018, 03:14

Re: Help with a % of area script

07 Jul 2019, 18:05

TomL wrote:
07 Jul 2019, 17:45
If the area is always visible on the screen, the PixelGetColor command will return the color of a specified pixel on the screen. Your script can periodically check the pixel's color and take action when it changes.
That kinda works is there a way to have it search a area on screen for numbers? like when the number 60 is shown it does something?
TomL
Posts: 16
Joined: 12 Jan 2016, 21:02

Re: Help with a % of area script

08 Jul 2019, 08:30

You can use the ImageSearch command to search if an image stored in a file is found on the screen. I suggest you take a screenshot of the screen by pressing the "PrtSc" button on your keyboard (assuming you have one), pasting it into an image editor, crop the image to only show the "60%", and save the cropped image to a file.

Return to “Ask For Help”

Who is online

Users browsing this forum: AHK_user, Bing [Bot], DRocks, HiSoKa, loek6000, Samantha and 220 guests