Sign in to follow this  
Followers 0
GreenReptile

Color locking Help

4 posts in this topic

#1 ·  Posted (edited)

.

Edited by GreenReptile

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Try this, to exit it press escape

The reason Pixelsearch didnt work for you is when it finds it it returns the cords that it was found, so you cant set equal to your color because it wont ever match.

#include <misc.au3>


func Color()
    While 1
        $mouse= MouseGetPos()
        $search = PixelGetColor($mouse[0], $mouse[1])
        
        if $search = 0x10FC18 Then
            MouseClick("left")
        EndIf
    WEnd
EndFunc

color()

do 
    
    
Until _IsPressed("1b")

GL,

Rental

Edited by Rental

Share this post


Link to post
Share on other sites

now when it finds the color it will also check what $var is, if is it 1 then it will click and change $var to 0 so that it doesnt click more then once.

#include <misc.au3>


func Color()
$var = 1
    While 1
        $mouse= MouseGetPos()
        $search = PixelGetColor($mouse[0], $mouse[1])
       
        if $search = 0x10FC18 Then
            if $var = 1 Then
                MouseClick("left")
                $var = 0
            EndIf
        EndIf
    WEnd
EndFunc

color()

do
   
   
Until _IsPressed("1b")

Rental

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

either will work, just depends on how you do it... and i dont know why it isnt working for you, I switch it to black and tryed it in Paint and it worked just fine.

right now its 3:00 here and i got to wake up at 7:00 for Turkey day so I cant help ya with the rest till tomarrow afternoon.

and i dont think that will work, but there is prob some ways to do that, but right now im off to bed

Edited by Rental

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0