Da 0wner
2009-05-23 03:37:02
{*******************************************************************************
function SaveScreenshotEx(Path : string; BlackoutUsername : boolean) : boolean;
By: Da 0wner improved by Shuttleu and a suggestion by Cazax
Description: Saves a screenshot of the RS screen to the Scripts folder inside
your SCAR folder and names it whatever you put for Name and blanks out the
username if BlackoutUsername is set to true.
*******************************************************************************}
function SaveScreenshotEx(Name : string; BlackoutUsername : boolean) : boolean;
var
W, H, BMP, i : integer;
Name1 : string;
begin
GetClientDimensions(W, H);
BMP := BitmapFromString(W, H, '');
CopyClientToBitmap(BMP, 0, 0, W, H);
if BlackoutUsername then
GetBitmapCanvas(BMP).Rectangle(10, 460, 104, 472); // Thanks Cazax
while True do
begin
if FileExists(AppPath + 'Scripts\' + Name + IntToStr(i) + '.bmp') then
Inc(i) else
begin
Name1:= (AppPath + 'Scripts\' + Name + IntToStr(i) + '.bmp');
break;
end;
end;
SaveBitmap(BMP, Name1);
result := FileExists(Name1);
end;This basically saves a screenshot of RuneScape. It is very simple and crappy. It also can blackout the username in the bottom left. I tried to add more checks to see if the file existed but it errored.