Target Window Functions

Freeze

function Freeze: boolean;

If you call Freeze, the data that is currently currently in the client is stored into memory. Simba will then target this memory for all further finding operations; until Unfreeze is called. This can dramatically increase speed if you don’t care if the image doesn’t change. It can be even more important if you don’t want the image to change; if you want to analyze a specific frame.

Use like:

Make sure you never forget to call Unfreeze!

Unfreeze

function Unfreeze: boolean;

Unfreeze the client data and restore the original client. See Freeze for more details.

GetClientDimensions

procedure GetClientDimensions(var w, h:integer);

Return the size of the client in w and h. If it fails, it returns -1 for both h and w.

GetClientPosition

procedure GetClientPosition(var left, top:integer);

Return the position of the client in left and top. May return negative values.

SetTargetBitmap

function SetTargetBitmap(Bitmap : integer): integer;

Set a bitmap as target / client. (It must be loaded by Simba)

SetTargetArray

function SetTargetArray(P: Integer; w, h: integer): integer;

Set a target array as client data. This is generally not something you’d want to call yourself. It is mainly included for external components to allow Simba to efficiently target its memory. See the SMART source on how to do this.

SetEIOSTarget

function SetEIOSTarget(name: string; initargs: Variant): integer;

SetImageTarget

procedure SetImageTarget(idx: integer);

SetKeyMouseTarget

procedure SetKeyMouseTarget(idx: integer);

GetImageTarget

function GetImageTarget: integer;

GetKeyMouseTarget

function GetKeyMouseTarget: integer;

ExportImageTarget

function ExportImageTarget : TTarget_Exported;

ExportKeyMouseTarget

function ExportKeyMouseTarget : TTarget_Exported;

FreeTarget

procedure FreeTarget(idx: integer);

SetDesktopAsClient

procedure SetDesktopAsClient;

Set the default desktop as client.

ActivateClient

procedure ActivateClient;

Set the current target as active for key input.

IsTargetValid

function IsTargetValid: boolean;

Returns true if the current target is valid.