SRL Archive - Help

How to make mouse click color X when color Y comes onto the screen?


Zoidberg

2012-03-08 13:10:57

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

2012-03-08 13:15:48

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

Sin

2012-03-08 13:16:23


repeat
wait(10);
until(FindColorTolerance(x,y,Color,Tolerance,Client box));
Mouse(x,y,0,0,True);

x[Warrior]x3500

2012-03-08 13:17:13


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

2012-03-08 13:40:15

From: x[Warrior]x3500

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.

From: Sin

repeat
wait(10);
until(FindColorTolerance(x,y,Color,Tolerance,Client box));
Mouse(x,y,0,0,True);


^^ that won't do what he requires btw

x[Warrior]x3500

2012-03-08 13:49:18

From: the flea
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

2012-03-08 13:57:13

Sweet, thanks guys. Putting this to work now. (Or trying, anyways.)

Nebula

2012-03-08 16:09:05

You'd probably want to use

WaitColor(x, y, Color, Tol, MaxTime);

the flea

2012-03-08 16:20:05

From: Nebula
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.