Todo (my list)
procedure rs_FixMouse(var x,y: integer; slot: Integer);
procedure rs_FixMouseEx(var x,y: integer; slot, maxshift, squaresx, squaresy, squaresize: Integer; minaccuracy: Extended);
function rs_GetUpText: string;
function rs_GetCompassAngleDegrees: Extended;
function rs_GetCompassAngleRadians: Extended;
function rs_ScanMiniMap(iFrom, iTo, Distance, Color: Integer): Integer;
function rs_OnMinimap(x, y: Integer): Boolean;
function rs_FindMMColors(Color: Integer): TIntegerArray;
procedure rs_DeleteUID;
function rs_DeleteUIDEx(Folder: string): Boolean;
function rs_GetInvSlot(xx, yy: Integer): Integer;
procedure rs_GetInvRC(xx, yy: Integer; var Row, Col: Integer);
function rs_GetShopSlot(xx, yy: Integer): Integer;
function rs_GetShopRC(xx, yy: Integer): Integer;
function rs_ShopScreen: Boolean;
function rs_FindShopColorSlot(var Slot: Integer; Color, Tolerance: Integer): Boolean;
function rs_FindShopBitmapSlot(var Slot: Integer; Bitmap, Tolerance: Integer): Boolean;
function rs_FindShopDTMSlot(var Slot: Integer; DTM: Integer): Boolean;
function rs_FindShopColorRC(var Row, Col: Integer; Color, Tolerance: Integer): Boolean;
function rs_FindShopBitmapRC(var Row, Col: Integer; Bitmap, Tolerance: Integer): Boolean;
function rs_FindShopDTMRC(var Row, Col: Integer; DTM: Integer): Boolean;
function rs_GetCurrentTab: Integer;
function rs_FindInvColorSlot(var Slot: Integer; Color, Tolerance: Integer): Boolean;
function rs_FindInvBitmapSlot(var Slot: Integer; Bitmap, Tolerance: Integer): Boolean;
function rs_FindInvDTMSlot(var Slot: Integer; DTM: Integer): Boolean;
function rs_FindInvColorRC(var Row, Col: Integer; Color, Tolerance: Integer): Boolean;
function rs_FindInvBitmapRC(var Row, Col: Integer; Bitmap, Tolerance: Integer): Boolean;
function rs_FindInvDTMRC(var Row, Col: Integer; DTM: Integer): Boolean;
//procedure GetMousePos(var x, y: Integer);
//procedure MoveMouse(x, y: Integer);
//procedure MoveMouseSmooth(x, y: Integer);
procedure MoveMouseSmoothEx(x, y: Integer; minsleeptime, maxsleeptime, maxdistance, gravity, forces: Integer);
procedure MoveMouseSmoothFrom(x1, y1, x2, y2: Integer);
procedure MoveMouseSmoothFromEx(x1, y1, x2, y2: Integer; minsleeptime, maxsleeptime, maxdistance, gravity, forces: Integer);
//procedure ClickMouse(x, y: Integer; Left: Boolean);
//procedure HoldMouse(x, y: Integer; Left: Boolean);
//procedure ReleaseMouse(x, y: Integer; Left: Boolean);
procedure ClickMouseMid(x, y: Integer);
procedure HoldMouseMid(x, y: Integer);
procedure ReleaseMouseMid(x, y: Integer);
procedure SetMouseMode(Silent: Boolean);
procedure MoveMouseSpline(x, y, rx, ry: Integer);
procedure MoveMouseSplineEx(x, y, rx, ry, mouseSpeed, ctrlSpacing, ctrlVariance: Integer);
procedure MoveMouseSplineFrom(sx, sy, ex, ey, rx, ry: Integer);
procedure MoveMouseSplineFromEx(sx, sy, ex, ey, rx, ry, mouseSpeed, ctrlSpacing, ctrlVariance: Integer);
procedure ClickMouseSpline(x, y, rx, ry: Integer; left: Boolean);
procedure MouseBox(x1, y1, x2, y2: Integer);
procedure ClickMouseBox(x1, y1, x2, y2: Integer; left: Boolean);
procedure MoveMouseCC(x, y, range, segments, pcount, delay: Integer);
//function SendInterSCARMessage(id, message: string): Boolean;
//function ReadInterSCARMessage(id: string): string;
//procedure SendInterSCARInteger(id: String; Int: Integer);
function ReadInterSCARInteger(id: String): Integer;
procedure SendInterSCARBoolean(id: String; Bool: Boolean);
function ReadInterSCARBoolean(id: String): Boolean;
procedure SendInterSCARExtended(id: String; Numb: Extended);
function ReadInterSCARExtended(id: String): Extended;
function ReadInterSCARInt64(id: String): Int64;
procedure SendInterSCARInt64(id: String; Numb: Int64);
function WriteFileByte(FileNum: Integer; b: Byte): Boolean;
function WriteFileInt(FileNum: Integer; i: Integer): Boolean;
function WriteFileString(FileNum: Integer; s: string): Boolean;
function ReadFileByte(FileNum: Integer; var b: Byte): Boolean;
function ReadFileInt(FileNum: Integer; var i: Integer): Boolean;
function ReadFileString(FileNum: Integer; var s: string; Length: Integer): Boolean;
procedure CloseFile(FileNum: Integer);
function EndOfFile(FileNum: Integer): Boolean;
function FileSize(FileNum: Integer): LongInt;
function OpenFile(Path: string; Shared: Boolean): Integer;
function RewriteFile(Path: string; Shared: Boolean): Integer;
procedure WriteINI(Section, KeyName, NewString, FileName: string);
function ReadINI(Section, KeyName, FileName: string): string;
function DirectoryExists(Directory: string): Boolean;
function FileExists(FileName: string): Boolean;
function ExtractFileName(FileName: string): string;
function ExtractFilePath(FileName: string): string;
function ExtractFileExt(FileName: string): string;
function ExtractFileDrive(FileName: string): string;
function GetFiles(Path, Ext: string): TStringArray;
procedure SaveToFile(Sender: TObject; FileName: string);
procedure LoadFromFile(Sender: TObject; FileName: string);
function GetSystemTime: Integer;
function GetTickCount: Integer;
function GetTimeRunning: Integer;
procedure ConvertTime(Ms: Integer; var H, M, S: Integer);
function Left(Text: string; Count: Integer): string;
function Right(Text: string; Count: Integer): string;
function Replace(Text, FindStr, ReplaceStr: string): string;
function GetNumbers(Text: string): string;
function GetLetters(Text: string): string;
function GetOthers(Text: string): string;
function TrimNumbers(Text: string): string;
function TrimLetters(Text: string): string;
function TrimOthers(Text: string): string;
function Capitalize(S: string): string;
function InStrArr(Str: string; Arr: TStringArray; CaseSensitive: Boolean): Boolean;
function Pow(Base, Exponent: Extended): Extended;
function IntPow(Base: Extended; Exponent: Integer): Extended;
function Max(a, b: Integer): Integer;
function MaxE(a, b: Extended): Extended;
function Min(a, b: Integer): Integer;
function MinE(a, b: Extended): Extended;
function SameValue(A, B: Extended): Boolean;
function Degrees(Radians: Extended): Extended;
function Radians(Degrees: Extended): Extended;
function ArcCos(X: Extended): Extended;
function ArcTan2(Y, X: Extended): Extended;
function Tan(X: Extended): Extended;
function ArcTan(X: Extended): Extended;
function ArcSin(X: Extended): Extended;
function Cotan(X: Extended): Extended;
function Secant(X: Extended): Extended;
function Cosecant(X: Extended): Extended;
function Hypot(X, Y: Extended): Extended;
function Cot(X: Extended): Extended;
function Sec(X: Extended): Extended;
function Csc(X: Extended): Extended;
function Cosh(X: Extended): Extended;
function Sinh(X: Extended): Extended;
function Tanh(X: Extended): Extended;
function CotH(X: Extended): Extended;
function SecH(X: Extended): Extended;
function CscH(X: Extended): Extended;
function ArcCot(X: Extended): Extended;
function ArcSec(X: Extended): Extended;
function ArcCsc(X: Extended): Extended;
function ArcCosh(X: Extended): Extended;
function ArcSinh(X: Extended): Extended;
function ArcTanh(X: Extended): Extended;
function ArcCotH(X: Extended): Extended;
function ArcSecH(X: Extended): Extended;
function ArcCscH(X: Extended): Extended;
function LnXP1(X: Extended): Extended;
function Log10(X: Extended): Extended;
function Log2(X: Extended): Extended;
function LogN(Base, X: Extended): Extended;
function Fract(number: Int64): Int64;
function BinCoe(a, b: LongInt): Extended;
function InRange(Value, Min, Max: Integer): Boolean;
function Distance(x1, y1, x2, y2: Integer): Integer;
function Sqr(X: Extended): Extended;
function Exp(Number: Extended): Extended;
function Rand: Extended;
function Inversus(E: Extended): Extended;
function Ceil(X: Extended): Integer;
function Floor(X: Extended): Integer;
function DecRet(E: Extended): Extended;
function InCircle(x, y, mx, my, r: Integer): Boolean;
procedure Inc(var Number: Integer);
procedure IncEx(var Number: Integer; nInc: Integer);
function Hypot(X, Y: Extended): Extended;
function InTriangle(x, y, x1, y1, x2, y2, x3, y3: Integer): Boolean;
//procedure Writeln(s: string);
//procedure ClearDebug;
procedure DeleteDebugLine(Line: Integer);
function GetDebugLineCount: Integer;
function GetDebugText: String;
//procedure Status(s: string);
//function GetStatus: string;
function Readln(question: string): string;
function GetTextAtEx(x, y: Integer; Tolerance: Integer; Chars: Integer; CheckShadow, CheckOutline: Boolean; MinSpacing, MaxSpacing: Integer; TextColor: Integer; TextLength: Integer; Strict: Boolean; Range: TCharRange): string;
function IsTextAtEx(x, y: Integer; S: String; Tolerance: Integer; Chars: Integer; CheckShadow, CheckOutline: Boolean; MinSpacing, MaxSpacing: Integer; TextColor: Integer): Boolean;
function IsTextInAreaEx(x1, y1, x2, y2: Integer; var x, y: Integer; S: String; Tolerance: Integer; Chars: Integer; CheckShadow, CheckOutline: Boolean; MinSpacing, MaxSpacing: Integer; TextColor: Integer): Boolean;
procedure PlaySound(s: string);
procedure SaveScreenshot(s: string);
function AppPath: string;
function ScriptPath: string;
function Random(Range: Integer): Integer;
function RandomRange(aFrom, aTo: Integer): Integer;
function RBool: Boolean;
function RBoolEx(Chance: Integer): Boolean;
//function GetColor(x,y: Integer): Integer;
//function FindColor(var x,y: Integer; color, xs, ys, xe, ye: Integer): Boolean;
function FindColorSpiral(var x,y: Integer; color, xs, ys, xe, ye: Integer): Boolean;
function FindColorSpiral2(var x,y: Integer; color, xs, ys, xe, ye: Integer): Boolean;
//function FindColorTolerance(var x,y: Integer; color, xs, ys, xe, ye: Integer; Tolerance: Integer): Boolean;
function FindColorSpiralTolerance(var x,y: Integer; color, xs, ys, xe, ye: Integer; Tolerance: Integer): Boolean;
function FindColoredAreaTolerance(var x,y: Integer; color, xs, ys, xe, ye: Integer; MinArea, Tolerance: Integer): Boolean;
procedure FindColorsTolerance(var Points: TPointArray; color, xs, ys, xe, ye: Integer; Tolerance: Integer);
procedure ColorToleranceSpeed(x: integer);
function SimilarColors(col1, col2, tolerance: integer): Boolean;
procedure FindColorsSpiralTolerance(x, y: Integer; var Points: TPointArray; color, xs, ys, xe, ye: Integer; Tolerance: Integer);
function FastGetPixel(bitmap: Integer; x, y: Integer): TColor;
procedure FastSetPixel(bitmap: Integer; x, y: Integer; c : TColor);
procedure SetColorspeed2Modifiers(huemodifier, saturationmodifier: Extended);
procedure PickColor(var Color: TColor; var X, Y: Integer);
function FindColorSkipBox(var x, y: Integer; color, x1, y1, x2, y2: Integer; SkipBox: TBox): Boolean;
function FindColorSkipBoxTolerance(var x, y: Integer; color, x1, y1, x2, y2, Tolerance: Integer; SkipBox: TBox): Boolean;
function FindColorSkipBoxArray(var x, y: Integer; color, x1, y1, x2, y2: Integer; SkipBoxes: TBoxArray): Boolean;
function FindColorSkipBoxArrayTolerance(var x, y: Integer; color, x1, y1, x2, y2, Tolerance: Integer; SkipBoxes: TBoxArray): Boolean;
function FindHue(var x, y: Integer; Hue: Extended; x1, y1, x2, y2: Integer): Boolean;
function FindHueTolerance(var x, y: Integer; Hue: Extended; x1, y1, x2, y2: Integer; Tolerance: Extended): Boolean;
function FindSaturation(var x, y: Integer; Sat: Extended; x1, y1, x2, y2: Integer): Boolean;
function FindSaturationTolerance(var x, y: Integer; Sat: Extended; x1, y1, x2, y2: Integer; Tolerance: Extended): Boolean;
function FindLuminance(var x, y: Integer; Lum: Extended; x1, y1, x2, y2: Integer): Boolean;
function FindLuminanceTolerance(var x, y: Integer; Lum: Extended; x1, y1, x2, y2: Integer; Tolerance: Extended): Boolean;
function CountColor(Color, x1, y1, x2, y2: Integer): Integer;
function CountColorTolerance(Color, x1, y1, x2, y2, Tolerance: Integer): Integer;
function FindColorSkipCoords(var x, y: Integer; color, x1, y1, x2, y2: Integer; const SkipCoords: TPointArray): Boolean;
function FindColorSkipCoordsTolerance(var x, y: Integer; color, x1, y1, x2, y2, Tolerance: Integer; const SkipCoords: TPointArray): Boolean;
function FindColorCircle(var x, y: Integer; color, mx, my, r: Integer): Boolean;
function FindColorCircleTolerance(var x, y: Integer; color, mx, my, r, Tolerance: Integer): Boolean;
//function GetColors(Coords: TPointArray): TIntegerArray;
function FindColorTriangle(var x, y: Integer; color, x1, y1, x2, y2, x3, y3: Integer): Boolean;
function FindColorTriangleTolerance(var x, y: Integer; color, x1, y1, x2, y2, x3, y3, Tolerance: Integer): Boolean;
function GetBitmapAreaColors(xs, ys, xe, ye: Integer): T2DIntArray;
procedure ColortoHSL(C: TColor; var H, S, L: Extended);
function HSLtoColor(H, S, L: Extended): TColor;
procedure RGBtoHSL(R, G, B: Integer; var H, S, L: Extended);
procedure HSLtoRGB(H, S, L: Extended; var R, G, B: Integer);
function RGBtoColor(R, G, B: Integer): TColor;
procedure ColortoRGB(Color: TColor; var R, G, B: Integer);
procedure RGBtoXYZ(R, G, B: Integer; var X, Y, Z: Extended);
procedure XYZtoRGB(X, Y, Z: Extended; var R, G, B: Integer);
procedure ColortoXYZ(Color: TColor; var X, Y, Z: Extended);
function XYZtoColor(X, Y, Z: Extended): TColor;
procedure HSLtoXYZ(H, S, L: Extended; var X, Y, Z: Extended);
procedure XYZtoHSL(X, Y, Z: Extended; var H, S, L: Extended);
procedure Wait(ms: Integer);
procedure Sleep(ms: Integer);
function SetTimeout(secs: Cardinal; procname: string): Integer;
procedure ClearTimeouts;
procedure ClearTimeout(s: string);
procedure SendKeys(S: string);
procedure SendKeysVB(S: string; Wait: Boolean);
procedure KeyDown(Key: Byte);
procedure KeyUp(Key: Byte);
procedure KeyDownSilent(Key: Byte);
procedure KeyUpSilent(Key: Byte);
function GetKeyCode(Key: Char): Byte;
procedure SendKeysSilent(S: string);
procedure SendArrowSilent(a: Byte);
procedure SendArrowSilentWait(a: Byte; WaitTime: Integer);
function IsMouseButtonDown(LeftButton: Boolean): Boolean;
function IsFunctionKeyDown(Key: Byte): Boolean;
function IsFKeyDown(Num: Byte): Boolean;
function IsArrowDown(Num: Byte): Boolean;
function IsKeyDown(C: Char): Boolean;
procedure SendKeysWait(Text: String; tWait, tRandom: Integer);
procedure SendArrow(Key: Byte);
procedure SendArrowWait(Key: Byte; WaitTime: Integer);
function FindWindow(Title: string): Boolean;
function FindWindowTitlePart(Title: string; CaseSensitive: Boolean): Boolean;
//function FindWindowBySize(Width, Height: Integer): Boolean;
procedure ActivateClient;
function GetClientWindowHandle: Integer;
procedure SetClientWindowHandle(H: Integer);
//function LoadBitmap(path: string): Integer;
function CreateBitmapMaskFromText(Text: string; Chars: Integer): Integer;
procedure LoadDebugBitmap(path: string);
function BitmapFromString(Width, Height: Integer; str: string): Integer;
procedure SaveBitmap(bitmap: Integer; path: string);
//procedure FreeBitmap(bitmap: Integer);
function GetBitmapCanvas(bitmap: Integer): TCanvas;
function FindBitmap(bitmap: Integer; var x, y: Integer): Boolean;
function FindBitmapIn(bitmap: Integer; var x, y: Integer; x1, y1, x2, y2: Integer): Boolean;
function FindBitmapToleranceIn(bitmap: Integer; var x, y: Integer; x1, y1, x2, y2: Integer; tolerance: Integer): Boolean;
function FindDeformedBitmapToleranceIn(bitmap: Integer; var x, y: Integer; x1, y1, x2, y2: Integer; tolerance: Integer; Range: Integer; AllowPartialAccuracy: Boolean; var accuracy: Extended): Boolean;
function FindDeformedBitmapToleranceRotationIn(bitmap: Integer; var x, y: Integer; x1, y1, x2, y2: Integer; tolerance: Integer; Range: Integer; var accuracy: Extended; AngleIntervals: Extended; StartAngle, MaxAngle: Extended; var angle: Extended): Boolean;
function RotateBitmap(bitmap: Integer; angle: Extended): Integer;
function FindBitmapSpiral(bitmap: Integer; var x, y: Integer; x1, y1, x2, y2: Integer): Boolean;
function FindBitmapSpiralTolerance(bitmap: Integer; var x, y: Integer; x1, y1, x2, y2: Integer; Tolerance: Integer): Boolean;
function FindBitmapMaskTolerance(mask: Integer; var x, y: Integer; x1, y1, x2, y2: Integer; Tolerance, ContourTolerance: Integer): Boolean;
//procedure CopyCanvas(Source, Dest: TCanvas; sxs, sys, sxe, sye, dxs, dys, dxe, dye: Integer);
//procedure SafeCopyCanvas(Source, Dest: TCanvas; sx1, sy1, sx2, sy2, dx1, dy1, dx2, dy2: Integer);
//function CreateMirroredBitmap(bitmap: Integer): Integer;
function FindBitmapRotated(bitmap: Integer; var x, y, Angle: Integer; x1, y1, x2, y2: Integer): Boolean;
procedure GetBitmapSize(Bitmap: Integer; var Width, Height: Integer);
function GetClientCanvas: TCanvas;
function GetDebugCanvas: TCanvas;
procedure SaveSetting(section, setting, value: string);
function LoadSetting(section, setting : string) : string;
//procedure ClearReport;
//procedure AddToReport(s: string);
procedure DisplayDebugImgWindow(Width, Height: Integer);
procedure HideDebugImgWindow;
function LoadChars2(path: string): Integer;
function LoadCharsFromFont2(fontname: string; fontsize: Integer; fontbold, fontitalic, fontunderline, fontstrike: Boolean): Integer;
procedure FreeChars2(i: Integer);
function LoadDTM(FileName: string): Integer;
function DTMFromString(s: string): Integer;
procedure FreeDTM(DTM: Integer);
function FindDTM(DTM: Integer; var x, y: Integer; x1, y1, x2, y2: Integer): Boolean;
function FindDTMRotated(DTM: Integer; var x, y: Integer; x1, y1, x2, y2: Integer; StartAngle, EndAngle, AngleStep: Extended; var Angle: Extended): Boolean;
function AddDTM(DTM: TDTM): Integer;
//function CreateForm: TForm;
procedure FreeForm(Form: TForm);
procedure TabSheetCaption(Tab: TTabSheet; Caption: String);
function GetSCARVersion: Integer;
procedure TerminateScript;
function IsFontSmoothingEnabled: Boolean;
procedure SetFontSmoothing(Enable: Boolean);
function ThreadSafeCall(ProcName: string; var V: TVariantArray): Variant;
procedure SetTargetBitmap(bitmap: Integer);
procedure GetClientDimensions(var Width, Height: Integer);
procedure CopyClientToBitmap(bitmap: Integer; xs, ys, xe, ye: Integer);
//procedure ChangeReportWidth(Width: Integer);
procedure SetBitmapFastDrawTarget(bitmap: Integer);
procedure SetTransparentColor(bitmap, color: Integer);
procedure SetTransparencyFromBitmap(Bitmap, AlphaMaskBitmap: Integer);
procedure Disguise(Caption: string);
procedure MoveToTray;
procedure SetClientPos(OnTop: Boolean);
function GetSoundDuration(FileName: string): Integer;
procedure MakeWindowTransparent(Window, Transparancy: Integer);
//function GetSelf: TScar;
//function GetApplication: TScarApp;
function PointInBox(Point: TPoint; Box: TBox): Boolean;
function IntInBox(x, y: Integer; Box: TBox): Boolean;
procedure FastDrawTransparent(x, y: Integer; SourceBitmap, TargetBitmap: Integer);
procedure FastDrawSizeTransparent(x1, y1, x2, y2: Integer; sourcebitmap, targetbitmap: Integer);
procedure FastDrawClear(bitmap: Integer; Color: TColor);
procedure SafeDrawBitmap(Source: Integer; Dest: TCanvas; x, y: Integer);
function GetPage(URL: string): string;
procedure OpenWebPage(URL: string);
function InitializeHTTPClient(HandleCookies, HandleRedirects: Boolean): Integer;
procedure FreeHTTPClient(i: Integer);
function GetHTTPPage(Client: Integer; URL: string): string;
procedure SetHTTPUserAgent(Client: Integer; Agent: string);
function PostHTTPPage(Client: Integer; Url: string; PostData: string): string;
function Between(s1, s2, s: string): string;
function PostHTTPPageEx(Client: Integer; Url: string): string;
procedure ClearPostData(Client: Integer);
procedure AddPostVariable(Client: Integer; VarName, VarValue: string);
function GetRawHeaders(Client: Integer): string;
function OpenConnection(Host: string; Port, TimeOut: Integer): Integer;
function ReadConnectionData(Connection: Integer; var s: string): Boolean;
function SendConnectionData(Connection: Integer; s: string): Boolean;
procedure FreeConnection(i: Integer);
function IsConnectionOpen(Connection: Integer): Boolean;
function IntToPoint(x, y: Integer): TPoint;
function Point(x, y: Integer): TPoint;
function BoolToStr(Bool: Boolean): String;
function StrToBool(Str: String): Boolean;
function PointToBox(p1, p2: TPoint): TBox;
function IntToBox(x1, y1, x2, y2: Integer): TBox;