SRL Archive - Help

Repeating and colour checking


zluo

2012-03-16 02:09:31

Can anyone help me by explaining how to do these two simple things?

Repeat a procedure for an amount of times.

Check the colour of a specific pixel. If false redo procedure but if true move onto next procedure.

Flight

2012-03-16 02:15:51


Procedure LoopIt;
Var
i: Integer;
begin
for i := 0 to 100 do //Start at 0 and loop anything 100 times
begin
Writeln('Loop number '+IntToStr(i));
//Whatever else
end;
end;

Daniel

2012-03-16 02:36:48

Also:


if(GetColor(x, y) = colour) then
... // If the colour is found, do this.
else
... // otherwise do this.

:)

zluo

2012-03-16 04:14:39

From: Flight

Procedure LoopIt;
Var
i: Integer;
begin
for i := 0 to 100 do //Start at 0 and loop anything 100 times
begin
Writeln('Loop number '+IntToStr(i));
//Whatever else
end;
end;


so if i wanted a simple mouse click in there, where would i put it