Try this out. Seems to work fine. 
Code:
Function FindLadderColor2:integer;
var
GenericColor, a, b, TestColor, Red, Green, Blue : integer;
var
i, j, n, ColorCount : integer;
var
ColorArray : array of integer;
begin
GenericColor := 10837;
Flag;
a := MMX1;
b := MMY1;
repeat
b := b + 1;
repeat;
a := a + 1;
if FindColorTolerance(x, y, GenericColor, a, b, MMX2, b, 60) then
begin
a := x;
TestColor := GetColor(x, y);
red := (TestColor mod 256);
green := ((TestColor / 256) mod 256);
blue := ((TestColor / 256) / 256);
if Green >= 5 then if Green <= 70 then
if Green - Blue >= 5 then if Green - Blue <= 60 then
if Red >= 55 then if Red <= 115 then
if Blue <= 30 then
if Red - Green >= 25 then if Red - Green <= 65 then
if Red - Blue >= 55 then if Red - Blue <= 105 then
begin
SetArrayLength(ColorArray,32);
n:=0;
for i:= 0 to 3 do
begin
for j:= 0 to 7 do
begin
ColorArray[n]:=GetColor(a+i,b-3+j); //Will get the colors around the found color to count the pixels
n:=n+1;
end;
end;
ColorCount:=0;
for n:= 0 to 31 do
begin
if ColorArray[n]=TestColor then ColorCount:=ColorCount+1;
end;
if ColorCount<17 then if ColorCount>12 then
begin
Result := TestColor;
WriteLn('Ladder color = ' + IntToStr(TestColor)
+
' at ' + IntToStr(a) + ',' + IntToStr(b));
Exit;
end;
end;
end else a := MMX2;
until a >= MMX2;
a := MMX1;
until b >= MMY2;
WriteLn('Could not find Ladder Color!');
Result := 0;
end;
BTW, when anything is committed to SRL, it has to be 'standardized', and for some reason the if..then statements had to be tabbed in each time. I hate it, but that's how it ended up looking. It originally looked this this one.
And I would probably use a FindObj type procedure or a FindColorTolerance scan to find the ladder on the MS once you get to it.