SRL Archive - Help and Support

What have I done wrong here?


z92

2007-04-22 04:35:33


program haxmobile2;
{.include SRL/SRL.scar}
var xy,yy:integer;


begin
repeat
if(findcolorTolerance(xy,yy,2228744,126,25,194,89,25))then
begin
repeat
clickmouse(138,371,true);

Until(findcolorTolerance(x,y,15198202,245,122,250,125,25))then
Begin
Repeat
MouseSpeed:=4
if(findcolorTolerance(x,y,6308393,198,159,345,239,25))then
Mouse(47,215,2,2,true);
wait(100+random(10))
Until(Not(findcolorTolerance(x,y,123321,198,159,345,239,25)))
End;


wait(100+random(100))
end;
until(false)
end.

What i am trying to make it do is: click the coordinate 138,371 repeatedly untill color 228744 shows up, then click coordinate 47,215 and go back to clicking 138,371.. :redface:
:spot:

nielsie95

2007-04-22 05:01:12


program haxmobile2;
{.include SRL/SRL.scar}
var xy,yy:integer;


begin
repeat
if(findcolorTolerance(xy,yy,2228744,126,25,194,89,25))then
begin
repeat
clickmouse(138,371,true);

Until(findcolorTolerance(x,y,15198202,245,122,250,125,25))then //then can't go after until =]
Begin //This should also be removed?
Repeat
MouseSpeed:=4
if(findcolorTolerance(x,y,6308393,198,159,345,239,25))then
Mouse(47,215,2,2,true);
wait(100+random(10))
Until(Not(findcolorTolerance(x,y,123321,198,159,345,239,25)))
End;


wait(100+random(100))
end;
until(false)
end.

I think it should be something like this:


program haxmobile2;
{.include SRL/SRL.scar}
var xy,yy:integer;


begin
repeat
repeat
if(findcolorTolerance(xy,yy,2228744,126,25,194,89,25))then Mouse(138,371, 0, 0, true);
Until(findcolorTolerance(x,y,15198202,245,122,250,125,25))

MouseSpeed := 4;

Repeat
if(findcolorTolerance(x,y,6308393,198,159,345,239,25))then
Mouse(47,215,2,2,true);
wait(100+random(10))
Until(Not(findcolorTolerance(x,y,123321,198,159,345,239,25)))

wait(100+random(100))
until(false)
end.

z92

2007-04-22 07:39:33

Thanks alot! Ill just need to add a little things to that and it will work perfectly! Ill post again if i need help :)

Oh actually one thing.. Is there some way to make it 'wait' for like 5 seconds to check if the color 15198202 is staying there while still clicking? I realize i could make a 5000 ms wait after the clicks, but that would not be so convinient…