Hi, I'm using the PixelGetColor function to throw a color to a variable, for example:
PixelGetColor, Red, 0, 0
If red = 0xC0L0R
Send {}
Only one works very well, the problem is that when adding another PixelGetColor is in the same script or another is very slow and none of the 2 work correctly, is there any way to leave 2 or more PixelGetColor and that they run faster? For example, every 50ms at the most.
Thank you in advance
PixelGetColor slow
Re: PixelGetColor slow
Your example does not show the problem you are having.Post the problem code and you will get an accurate answer.
Re: PixelGetColor slow
Code: Select all
PixelGetColor, verde, 520, 630
PixelGetColor, vermelho, 596, 622
Loop
{
if %verde% = 0x009800
{
Send, {A}
}
if %vermelho% = 0x0000FF
{
Send, {S}
}
}
This is the code
Re: PixelGetColor slow
I posted a very similar problem just a day ago, see here:
https://autohotkey.com/boards/viewtopic.php?f=5&t=27098
The solution given worked for me, and was just updated today to fix a memory leak.
https://autohotkey.com/boards/viewtopic.php?f=5&t=27098
The solution given worked for me, and was just updated today to fix a memory leak.
Last edited by Entropy42 on 24 Jan 2017, 12:35, edited 1 time in total.
Re: PixelGetColor slow
Remove all %.
Also, the PixelGetColor isn't inside the loop, so it will check both pixels once and then repeatedly send the keys based on that result.
Also, the PixelGetColor isn't inside the loop, so it will check both pixels once and then repeatedly send the keys based on that result.