hello everyone.
s::
PixelGetColor
if (color != 0x3A201E)
Sleep, 500
Send {Rbutton}
Sleep, 500
Send {Lbutton}
Return
i want this script,on that pixel to start for some reason this script dosent work.
maybe im doing something wrong.
hope someone can fix that for me.
Why this dosent work.
Re: Why this dosent work.
PixelGetColor command requieres at least 3 parameters
(see: https://www.autohotkey.com/docs/command ... tColor.htm)
A pixel is a part of your screen so it is necessary that AutoHotkey know which pixel, in other words at which coordinates (x, y) you want it to check for the screen color.
Note also that coordinates retieved by the command are relative to the active window unless CoordMode was used to change that.
Besides, it is also necessary to store the result in some variable:
for exemple:
(see: https://www.autohotkey.com/docs/command ... tColor.htm)
A pixel is a part of your screen so it is necessary that AutoHotkey know which pixel, in other words at which coordinates (x, y) you want it to check for the screen color.
Note also that coordinates retieved by the command are relative to the active window unless CoordMode was used to change that.
Besides, it is also necessary to store the result in some variable:
for exemple:
Code: Select all
CoordMode, Pixel, Screen ; coordinates are relative to top-left corner of the screen
PixelGetColor, ColorOfMyPixelAtCoords100_100, 100, 100
if (ColorOfMyPixelAtCoords100_100 != 0x3A201E)
{
MsgBox % "La couleur aux coordonées x=100,y=100 n'est pas 0x3A201E mais " . ColorOfMyPixelAtCoords100_100
}
Who is online
Users browsing this forum: No registered users and 253 guests