Jump to content
Sign in to follow this  

$Posi = MouseGetPos() $CropColour = PixelGetColor($Posi[0], $Posi[1])

Recommended Posts


Not sure where I went wrong here,

Form looks for pixel at current mouse pos (on key press), clicks it, if the user states it was correct it writes to .ini, if not repeat, for some reason it doesn't click on the pixel.

Func Pixel()
    MsgBox(0, "", "Hover over the crop and press F1 ")
    While $Found = False
        If _IsPressed("70", $DLL) Then
            $Posi = MouseGetPos()
            $CropColour = PixelGetColor($Posi[0], $Posi[1])
$CropColour = Hex($CropColour, 6)
MsgBox(0, "", "You chose: " & $CropColour)
            MsgBox(0, "", "Testing your selection")
            $Coord2 = PixelSearch(30, 30, 900, 610, $CropColour)
            If Not @error Then
                MouseClick("Left", $Coord2[0], $Coord2[1], 2, 0)
            $Question = MsgBox(4, "?", "Was that the right one?")
            If $Question = 6 Then
;               Input2()
                $Found = True

Func WriteIni()

IniWrite("C:\FV.ini", "Fruit","Fruit 1", $CropColour)


Any ideas?

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.