SRL Archive - OSR Help

FindAllObjsRecord help please


copperhaxor

2011-12-16 08:24:35

Can anyone please explain how to use FindAllObjsRecord,


procedure find;
var
x, y:integer;
begin

if findobjcustom(x, y, ['Exp', 'Att'], [10085848, 2309200, 7303540, 1847103], 10) then
begin
FindAllObjsRecord(x, y, [COLOR="Red"]<----??????[/COLOR]

mouse(x, y, 3, 3, true);
end;
end;

Kyle Undefined

2011-12-16 08:51:27


{*******************************************************************************
function FindAllObjsRecord(var Objects: TPointArray; AutoInfo: TAutoColorInfo; x1, y1, x2, y2: Integer; QuickSorting, RGBXYZCheck: Boolean): Boolean;
By: Sumilion
Description: Finds an Object using a TAutoColorInfo record, returns the center of the found objects.
*******************************************************************************}

To setup this function correctly, you'll need to setup a TPointArray, and TAutoColorInfo vars.


var
TPAs : TPointArray;


var
acInf : TAutoColorInfo;

acInfo.Color := 5724517;
acInfo.LumTol := 12;
acInfo.HueMod := 0.10;
acInfo.SatMod := 0.07;
acInfo.MinCount := 130;
acInfo.MaxCount := 148;

That way, you can do this:

FindAllObjsRecord(TPAs, acInfo, MSX1, MSY1, MSX2, MSY2, True, True);

Now, I've never actually used this, this is just what I understand from looking at the code.

Hope this helps.

BraK

2011-12-17 04:50:06

Moved into Scripting Help section