Jump to content

Recommended Posts

Posted (edited)

My mouse is scanning a certain part of the screen and I want that when a certain pixel will get the color "13026048" then it will do something. I dont want to use pixelgetcolor because it look only for one pixel. I want to use a command that will look for a a rectangle of pixels(area) .

Func CheckColor()

If ; in a certain area the color "13026048" is found then
; do this
AdlibDisable
EndIf

EndFunc


Func Start()
    
AdlibEnable("CheckColor", 100)

While 1
    
Mousemove(298,156, 5)
Mousemove(518,159, 50)
Mousemove(520,172, 5)
Mousemove(301,165, 50)
Mousemove(295,200, 5)
Mousemove(529,210, 50)
Mousemove(528,247, 5)
Mousemove(286,245, 50)
Mousemove(285,282, 5)
Mousemove(517,302, 50)
Mousemove(496,324, 5)
Mousemove(319,317, 50)
Mousemove(338,338, 5)
Mousemove(474,344, 50)
Mousemove(461,355, 5)
Mousemove(348,345, 50)
Mousemove(356,356, 5)
Mousemove(452,365, 50)
Wend

    
EndFunc

Coordinates of my rectangle : (198,127) , (198,150) , (288,146) , (288, 126)

Thanks !

Edited by J0ker
Posted

Look for PixelGetColor. It has what you are looking for.

If you are trying to get the pixel color under the mouse, then combine PixelGetColor and MouseGetPos

Posted (edited)

Pixelgetcolor is only for one pixel, but i'm looking for something that check an area of pixels.

If ; in a certain area the color "13026048" is found then
; do this
AdlibDisable
EndIf

Does anyone know wich command should I use?

Edited by J0ker

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...