SRL Archive - Help and Support

Cant find these..


Junior

2009-09-06 08:40:32

Im trying to find the whole procedure/function FindColorSkipBoxArray, and FindColors. I looked through all the includes, srl manual, and i just gave up after a few times searching. And whats up with IsUpText? Its not working for me, does anyone else have this problem?

EDIT: Im looking for the WHOLE written procedure. I know the parameters of each. I want to look INSIDE of it. From begin to end;.

noidea

2009-09-06 08:57:30

FindColors is in Overwrite.scar ;)
FindColors(TPA, Col, x1, y1, x2, y2,);
FindColorSkipBoxArray(x, y, col, x1, y1, x2, y2, SkipBoxes{Tboxarray})

Junior

2009-09-06 09:08:29

I dont think I made myself clear. Im looking for the WHOLE written procedure. I know the parameters of each. I want to look INSIDE of it. Thanks for the reply.

JAD

2009-09-06 09:09:11

Open SCAR and press F1. Here is a list of all the color functions (I think that I took out all the bitmap ones):

Color, bitmap searching and related functions

function GetColor(x, y: Integer): Integer;
Return color number at x, y.

function GetColors(Coords: TPointArray): TIntegerArray;
Works like GetColor, but allows you to get the color of several points, specified by Coords.

function FindColor(var x, y: Integer; color, xs, ys, xe, ye: Integer): Boolean;
Find color in box specified by xs, ys, xe, ye starting from left to right. Returns True if color found, the coordinates of the color if found is put in x,y.

function FindColorTolerance(var x, y: Integer; color, xs, ys, xe, ye: Integer; Tolerance: Integer): Boolean;
Works like the regular FindColor function but with a tolerance parameter for finding any similar color. Tolerance is used to find a color in range of the color you are looking for. The greater color range you want, the higher the tolerance parameter should be.

function FindColorSpiral(var x, y: Integer; color, xs, ys, xe, ye: Integer): Boolean;
Find color in box specified by xs, ys, xe, ye but start from x,y.

function FindColorSpiralTolerance(var x, y: Integer; color, xs, ys, xe, ye: Integer; Tolerance: Integer): Boolean;
Works like the regular FindColorSpiral but with a tolerance parameter for finding any similar color. Tolerance is used to find a color in range of the color you are looking for. The greater color range you want, the higher the tolerance parameter should be.

function FindColorSpiral2(var x, y: Integer; color, xs, ys, xe, ye: Integer): Boolean;
Find color just like FindColorSpiral, and if there is a big spot of that color then it finds the center of it.

function FindColoredAreaTolerance(var x, y: Integer; color, xs, ys, xe, ye: Integer; MinArea, Tolerance: Integer): Boolean;
Works similar to FindColorTolerance but instead of finding just 1 colored pixel and storing the coordinates into x and y, it finds an area where the colored pixel was found and stores a random coordinate according to the entered MinArea value into x,y. MinArea is specified by the count of pixels it has in an area. To find area in size 10X10 you would enter 100 as MinArea.

function FindColorSkipBox(var x, y: Integer; color, x1, y1, x2, y2: Integer; SkipBox: TBox): Boolean;
Finds a color in an area specified by x1, y1, x2 and y2, while skipping the area specified by the TBox, SkipBox.

If you'd be using a non-spiral findcolor function, the dot in the green area would be found first, but since it is in the green area which is the part where the skipbox overlaps the search area, it will ignore it, so the other dot will be found.

function FindColorSkipBoxTolerance(var x, y: Integer; color, x1, y1, x2, y2, Tolerance: Integer; SkipBox: TBox): Boolean;
Works like the regular FindColorSkipBox function but with a tolerance parameter for finding any similar color. Tolerance is used to find a color in range of the color you are looking for. The greater color range you want, the higher the tolerance parameter should be.

function FindColorSkipBoxArray(var x, y: Integer; color, x1, y1, x2, y2: Integer; SkipBoxes: TBoxArray): Boolean;
Finds a color in an area specified by x1, y1, x2 and y2, while skipping the areas specified by the TBoxArray, SkipBoxes.

function FindColorSkipBoxArrayTolerance(var x, y: Integer; color, x1, y1, x2, y2, Tolerance: Integer; SkipBoxes: TBoxArray): Boolean;
Works like the regular FindColorSkipBoxArray function but with a tolerance parameter for finding any similar color. Tolerance is used to find a color in range of the color you are looking for. The greater color range you want, the higher the tolerance parameter should be.

function FindColorSkipCoords(var x, y: Integer; color, x1, y1, x2, y2: Integer; SkipCoords: TPointArray): Boolean;
Finds a color in an area specified by x1, y1, x2 and y2, while skipping the coordinates specified by SkipCoords.

function FindColorSkipCoordsTolerance(var x, y: Integer; color, x1, y1, x2, y2, Tolerance: Integer; SkipCoords: TPointArray): Boolean;
Works like the regular FindColorSkipCoords function but with a tolerance parameter for finding any similar color. Tolerance is used to find a color in range of the color you are looking for. The greater color range you want, the higher the tolerance parameter should be.

function FindColorCircle(var x, y: Integer; color, mx, my, r: Integer): Boolean;
Finds a color in a circular area specified by a set of coordinates for the midpoint (mx, my) and a radius specified by r.

function FindColorCircleTolerance(var x, y: Integer; color, mx, my, r, Tolerance: Integer): Boolean;
Works like the regular FindColorCircle function but with a tolerance parameter for finding any similar color. Tolerance is used to find a color in range of the color you are looking for. The greater color range you want, the higher the tolerance parameter should be.

function FindColorTriangle(var x, y: Integer; color, x1, y1, x2, y2, x3, y3: Integer): Boolean;
Finds a color in a triangle defined by 3 points (x1, y1), (x2, y2) and(x3, y3). If the function returns true then the color was found. The coordinates of the found color are returned in x, y.

function FindColorTriangleTolerance(var x, y: Integer; color, x1, y1, x2, y2, x3, y3, Tolerance: Integer): Boolean;
Works like the regular FindColorTriangle function but with a tolerance parameter for finding any similar color. Tolerance is used to find a color in range of the color you are looking for. The greater color range you want, the higher the tolerance parameter should be.

function GetBitmapAreaColors(xs, ys, xe, ye: Integer): T2DIntArray;
Returns the colors of the area specified by the points (xs, ys) and (xe, ye) in a 2 dimensional integer array.

function CountColor(Color, x1, y1, x2, y2: Integer): Integer;
Counts the instances found of Color in the area specified by x1, y1, x2 and y2.

function CountColorTolerance(Color, x1, y1, x2, y2, Tolerance: Integer): Integer;
Works like the regular CountColor function but with a tolerance parameter for finding any similar color. Tolerance is used to find a color in range of the color you are looking for. The greater color range you want, the higher the tolerance parameter should be.

function FindColorComp(var x, y: Integer; Comp: Variant; CompType: TColorComp; xs, ys, xe, ye: Integer; Tolerance: Extended): Boolean;
Finds a certain component in the same way as FindColor(Tolerance) finds a color. You can define which colorcomponent you want to search with the CompType paramater (ccRed, ccGreen, ccBlue, ccHue, ccSat, ccLum) and you enter the value of the component you're looking for in the parameter Comp.

function SimilarColors(col1, col2, tolerance: Integer): Boolean;
Function to test weather two colors are within tolerance range. If they are within range, it returns true, if not false.

procedure PickColor(var Color: TColor; var X, Y: Integer);
This command allows color to be picked directly from script. Color returns color picked and x, y returns coordinates the color was picked at.

function FindColors(var Points: TPointArray; Color, xs, ys, xe, ye, Tol: Integer): Boolean;
Finds all colors in the area specified by xs, ys, xe, ye and returns their coordinates in Points. Will return True if any colors are found.

function FindColorsTolerance(var Points: TPointArray; Color, xs, ys, xe, ye, Tol: Integer): Boolean;
Finds all colors with tolerance in the area specified by xs, ys, xe, ye and returns their coordinates in Points. Will return True if any colors are found.

procedure FindColorsSpiralTolerance(x, y: Integer; var Points: TPointArray; color, xs, ys, xe, ye: Integer; Tolerance: Integer);
Finds all colors in area specified by xs, ys, xe, ye and returns their coordinates into Points.


Junior! You're back :) I still remember using your air crafter back in February, 07, when I first became a member. Your brother is really moving along nicely as well. Hope you're here to stay!

~JAD

Junior

2009-09-06 09:15:34

Thanks for that JAD that will come in handy, never knew. Yea the old air crafter that was something. And my brother sucked me back into SCAR. I didnt even think about it until i seen the bulldozer on my desktop im like WTF?! Ahhh memories…

BobboHobbo

2009-09-06 09:18:04

Ooo your back! btw, who is your brother xD?

noidea

2009-09-06 09:19:52

Bramble?

Sir R. M8gic1an

2009-09-06 12:25:26

Considering these are scar functions, I highly doubt any of us will see the source anytime soon.

~RM