View Full Version : How to make mouse click color X when color Y comes onto the screen?
Zoidberg
03-08-2012, 06:10 PM
Hi all!
I was wondering if anyone knew how to make your mouse click color X when color Y comes onto the screen for use in a reaction time flash game.
Thanks! :3
-Zoidberg
the flea
03-08-2012, 06:15 PM
how about something like:
if findcolor(x,y,colory,x1,y1,x2,y2) then
if findcolor(x,y,colorx,x1,y1,x2,y2) then
Mouse(x,y,1,1,true);
probably is a more sophisticated way to do this though :P
repeat
wait(10);
until(FindColorTolerance(x,y,Color,Tolerance,Clien t box));
Mouse(x,y,0,0,True);
x[Warrior]x3500
03-08-2012, 06:17 PM
if(findcolor(x,y, -insert Y color-, x1,y1,x2,y2)then
if(findcolor(x,y, -insert X color-, x1,y1,x2,y2)then
mouse(x,y,2,2,true);
the flea
03-08-2012, 06:40 PM
x3500;954758']
if(findcolor(x,y, -insert Y color-, x1,y1,x2,y2)then
if(findcolor(x,y, -insert X color-, x1,y1,x2,y2)then
mouse(x,y,2,2,true);
don't want to sounds rude warrior but you posted the exact same code as I had already done... not really necessary.
repeat
wait(10);
until(FindColorTolerance(x,y,Color,Tolerance,Clien t box));
Mouse(x,y,0,0,True);
^^ that won't do what he requires btw
x[Warrior]x3500
03-08-2012, 06:49 PM
don't want to sounds rude warrior but you posted the exact same code as I had already done... not really necessary.
^^ that won't do what he requires btw
sry. before i posted, there werent any comments. so i opened up simba, (got distracted for a bout a min) then wrote the code and pasted it in here. seems like u wrote the code 2 mins before me.
Zoidberg
03-08-2012, 06:57 PM
Sweet, thanks guys. Putting this to work now. (Or trying, anyways.)
Nebula
03-08-2012, 09:09 PM
You'd probably want to use
WaitColor(x, y, Color, Tol, MaxTime);
the flea
03-08-2012, 09:20 PM
You'd probably want to use
WaitColor(x, y, Color, Tol, MaxTime);
That's what I was looking for earlier, that is what I would use.
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.