SRL Archive - Help and Support

Make something repeat 3 times


whitevans1

2006-04-28 23:17:15

I'm trying to make this repeat 3 times please help be much appreciated..

if(FindBitmap(finallogin, x, y))then
ClickMouse(x,y, true);

I'm trying to make the clickmouse part repeat 3 times…

driger1592

2006-04-28 23:22:33

var i: integer;

begin
if(FindBitmap(finallogin, x, y))then
For i := 1 To 3 Do
ClickMouse(x,y, true);
end.
If you want me to explain it, I will. Basically, it takes the integer we made at the beginning of the script (i), and adds to it each time it does a ClickMouse. I will explain it better if you need me to. I'm usually available for help on MSN Messenger if you need it ;)

phantombmx

2006-04-28 23:34:58

it can also be done like this if you think its easier

var i: integer;

begin
if(FindBitmap(finallogin, x, y))then
repeat
ClickMouse(x,y, true);
i:=i+1
until(i=3)
end.

if you find the bitmap then repeat clickmouse until i = 3.. add 1 to i each time it clicks the mouse