Jump to content

Recommended Posts

Posted

Hi, im new in coding i just want to make a simple pixel search script.

I put a folder in my desktop and i run the script to find it by pixel coller and click's 2x.

It does fine, but after it opens the folder the script just spam click's on the folder place, but the coller isnt there anymore cus ther folder open in fullscreen.

HotKeySet("{F3}","exit")

Func exit()

Exit

EndFunc

MsgBox(0, "Test", "Press F3 to close.")

$pixel = PixelSearch(0,0,1023,800, 0xE78A3A)

while 1 = 1

if IsArray($pixel) = True Then

MouseMove($pixel[0], $pixel[1],1)

MouseClick("left")

MouseClick("left")

sleep(1000)

EndIf

WEnd

can any 1 plez help me XS can't get it right.

ps: sorry for bad english

Posted

$pixel gets set to be an array, and in the while loop it's always an array, so it's always true. The three mouse statements can be replaced with one mouseclick line - MouseClick("left", $pixel[0], $pixel[1], 2, 1).

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Posted (edited)

ok so i did this:

while 1 = 1

if IsArray($pixel) Then

MouseClick("left", $pixel[0], $pixel[1], 2, 1)

sleep(1000)

EndIf

WEnd

it does the same thing click spam =/

Edited by Ryukk0
Posted

no, i think. i whant the script to do this:

find the color click it and if color desapears stop clicking till i have the color again to do the same thing

i think cod is right i can't figure out is why spam click when the color isnt there =/

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...