Basic Techniques

From SRL Wiki

Jump to: navigation, search

Contents

Basic Scripting Techniques.

Below are some articles that cover the basic techniques.

Finding Colors

Outline of SCAR's Color Finding procedures.

FindColor


Function FindColor(var x, y: integer; color, xs, ys, xe, ye: Integer): Boolean;

Returns the result true if it finds the "color" in the specified area "xs, ys, xe, ye"


FindColorTolerance


Function FindColorTolerance(var x, y: integer; color, xs, ys, xe, ye: Integer; Tolerance: Integer): Boolean;

Same as FindColor, except it has a tolerance so similar colors may be found. The higher the tolerance, the more of an offset the color can be.


FindColorSpiralTolerance


Function FindColorSpiralTolerance(var x, y: integer; color, xs, ys, xe, ye: Integer; Tolerance: Integer): Boolean;

Same as FindColorTolerance, but searches in a circular spiral starting from the centre of the specified area and works outwards.


FindColorsSpiralTolerance


FindColorsSpiralTolerance(x, y: integer; var Points: TPointArray; color, xs, ys, xe, ye: Integer; Tolerance: Integer)

Will find colors in a spiral like FindColorTolerance, except returns an array of points from where the color was found as the "points" TPA.

Finding Bitmaps

Outline of SCAR's Bitmap Handling procedures.

Finding Text

Outline of SCAR's Text procedures.

Finding DTM's

How to use SCAR's Deformed Template Models.

Mouse Handling

Outline of SCAR's Mouse procedures.

Keyboard Handling

Outline of SCAR's Keyboard procedures.

Loops

How to build clever loops that will improve your scripts.

Scripting Standards

Outline of Standards formatting if your program.

Designing Scripts

How should your script internally work? What logic should you apply, et cetera...

Personal tools