SRL Archive - Download S.M.A.R.T.

Embedded SMART Release 6 & Smart.scar


BenLand100

2007-09-22 21:32:54

Added SmartGetRefresh and SmartSetRefresh which control the FPS slider on the right side. They return/take values between 1 and 100 relating to the percent position of the slider. Also you can now type while blocking :f: plus, as a result, you shouldn't have to always stop/start/stop to type.

procedure MoveMouse(x, y: Integer);
begin
SmartMoveMouse(x, y);
end;

procedure HoldMouse(x, y: Integer; left: Boolean);
begin
SmartHoldMouse(x, y, left);
end;

procedure ReleaseMouse(x, y: Integer; left: Boolean);
begin
SmartReleaseMouse(x, y, left);
end;

procedure KeyUp(key: Byte);
begin
SmartReleaseKey(key);
end;

procedure KeyDown(key: Byte);
begin
SmartHoldKey(key);
end;

procedure SendKeys(S: String);
begin
SmartSendKeys(S);
end;

procedure GetMousePos(var x, y: Integer);
begin
SmartGetMousePos(x, y);
end;

function GetColor(x, y: Integer): Integer;
begin
result:= SmartGetColor(x, y);
end;

procedure SmartSetTarget;
var
Smart_Bitmap: Integer;
begin
Smart_Bitmap:= BitmapFromString(765,503,'');
GetBitmapCanvas(Smart_Bitmap).Handle:= SmartGetDC;
SetTargetBitmap(Smart_Bitmap);
FreeBitmap(Smart_Bitmap);
end;

function FindWindow(Title: String): Boolean;
begin
result:= true;
end;

procedure ActivateClient;
begin
end;

function FindWindowBySize(Width, Height: Integer): Boolean;
begin
result:= true;
end;

Hobbit

2007-09-23 01:10:08

Woot another update :)
I used it today and I love it Ben :)

FIRST POST :)

Wizzup?

2007-09-23 02:39:06

Good job ben. :)

Markus

2007-09-23 06:42:19

Wowawewa! This is so coool :)
I mess a bit with the slider, and the CPU usage is almost instantly reduced to 20% (from 80%).
edit: wtf? it keeps crashing when I try some script =/

Smartzkid

2007-09-23 13:29:24

Post your code?

Very nice Ben, script fps control will be very nice.

Why aren't you using SetTargetDc?

Wizzup?

2007-09-23 16:14:09

From: Smartzkid
Post your code?

Very nice Ben, script fps control will be very nice.

Why aren't you using SetTargetDc?


He does.

SetTargetDC(SmartGetDC);
Or just

SmartSetTarget;

Both works.

Markus

2007-09-24 11:45:26

From: Smartzkid
Post your code?


just a simple login script, that does setupsrl; and loginplayer;

BenLand100

2007-09-24 13:13:11

From: Markus
just a simple login script, that does setupsrl; and loginplayer;

Must call SmartSetup and either SetTargetDC(SmartGetDC) or SmartSetTarget before using any smart procedures.