If someone knows a way to clear up the pictures created, lemmie know..



I used the below code.. gets colours in the box 4 times.. checks which pixels changed and turns those ones black.. The text pixel colours are wayy brighter and have a way lower tolerance than the background when rotated.. if u can find pixels of a specific brightness tolerance then that'll improve the accuracy of this.. I thought it'd be easy to dynamically make fonts but it isn't..
{$DEFINE SRL5}
{$DEFINE CRASHSMART}
{$DEFINE SMART}
{$I SRL/srl.Simba}
{$I SRL/SRL/Misc/Debug.Simba}
type
TPAC = record
TPA: TPointArray;
TIA: TIntegerArray;
end;
(*
Function GetTPACBox(B: TBox): TPAC;
var
Temp: TPAC;
TP: TPoint;
I, J, K, W, H: Integer;
begin
W:= B.X2 - B.X1;
H:= B.Y2 - B.Y1;
K:= 0;
For I:= 0 To H do
begin
For J:= 0 To W do
begin
SetLength(Temp.TPA, Length(Temp.TPA) + 1);
TP:= Point(B.X1 + J, B.Y1 + I);
Temp.TPA[K]:= TP;
Inc(K);
end;
J:= 0;
end;
SetLength(Temp.TIA, Length(Temp.TPA));
Temp.TIA:= GetColors(Temp.TPA);
Result:= Temp;
end;
*)
Function GetTPACBox(B: TBox): TPAC;
var
Temp: TPac;
begin
Temp.TPA:= TPAFromBox(B);
Temp.TIA:= GetColors(Temp.TPA);
Result:= Temp;
end;
Procedure GetTextBoxes;
var
Temp: Array of TPAC;
B: TBox;
I, K, BMP, W, H: Integer;
begin
B:= IntToBox(7, 10, 285, 27);
SetLength(Temp, 4);
Temp[0]:= GetTPACBox(B);
Sleep(1000);
MakeCompass('E');
Sleep(1000);
Temp[1]:= GetTPACBox(B);
MakeCompass('S');
Sleep(1000);
Temp[2]:= GetTPACBox(B);
MakeCompass('W');
Sleep(1000);
Temp[3]:= GetTPACBox(B);
W:= B.X2 - B.X1;
H:= B.Y2 - B.Y1;
K:= 0;
For I:= 0 To High(Temp[0].TIA) do
begin
if(
Not(SimilarColors(Temp[0].TIA[K], Temp[1].TIA[K], 25)) or
Not(SimilarColors(Temp[0].TIA[K], Temp[2].TIA[K], 25)) or
Not(SimilarColors(Temp[0].TIA[K], Temp[3].TIA[K], 25)) or
Not(SimilarColors(Temp[1].TIA[K], Temp[2].TIA[K], 25)) or
Not(SimilarColors(Temp[1].TIA[K], Temp[3].TIA[K], 25)) or
Not(SimilarColors(Temp[2].TIA[K], Temp[3].TIA[K], 25))
) then
begin
Temp[0].TIA[I]:= 0;
Temp[1].TIA[I]:= 0;
Temp[2].TIA[I]:= 0;
Temp[3].TIA[I]:= 0;
end;
Inc(K);
end;
BMP:= CreateBitmap(W + 50, H + 50);
FastSetPixels(BMP, Temp[0].TPA, Temp[0].TIA);
DebugBitmap(BMP);
FreeBitmap(BMP);
end;
begin
Smart_Server := 72;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
setupSRL;
MMouse(664, 228, 0, 0);
GetTextBoxes;
end.