Greetings,
I have an issue with my code.
When I use that code by itself it returns the correct 0x292EFE code when I press <ALT>-<o>:
!o::
PixelGetColor, couleur, 1244, 44
MsgBox The color at the current cursor position is %couleur%.
Return
When I integrate the pixelgetcolor in my main macro, it returns 0xFFFFFF. Here is the part of the cde where I use i, it is a simple counter that goes downt:
.....
secsLeft--
PixelGetColor, couleur, 1244, 44
MsgBox The color at the current cursor position is %couleur%. ;This is just to check the code passed to the if
If (Couleur != 0x292EFE and secsLeft < 280)
{
MsgBox In the loop and color is %couleur%.
SetTimer ShowTimer,Off
Gui, Destroy
exit
}
.....
I have no global variable settings like coormode in my main macro. Any idea why it does not return the right code? I read that the coordinate taken under the mouse is not the same than PixelGetColor. But it works with my first code and not the second one....
Thank you
PixelGetColor
Re: PixelGetColor
use CoordMode Screen or make absolutely sure ur coords are correct, otherwise u might be sampling areas which are offscreen
if ure trying this out in a fullscreen game, change it to fullscreen borderless or it wont work ever
if ure trying this out in a fullscreen game, change it to fullscreen borderless or it wont work ever
Re: PixelGetColor
Thank you for your answer.
If I use Coordmode, will it be the same coordinates? I have no way to know the exact coordinates except using my mouseclick and record it and use the coordinates.
Thank you
If I use Coordmode, will it be the same coordinates? I have no way to know the exact coordinates except using my mouseclick and record it and use the coordinates.
Thank you
Re: PixelGetColor
also make sure your main script doesn't move any windows above your coordinate location, because they you'd get the wrong color
Who is online
Users browsing this forum: bowie1123 and 331 guests