SRL Archive - S.M.A.R.T. Bugs and Improvements.

Disabling of some procedures


King of Knives

2007-11-24 05:46:31

I've found that TakeScreen totally laggs my SMART Client out, and all I get in the debug-picture is a picture from RS-coords 0,0 through 0,50. I'm actually not sure if it's takescreen or the picture-showing that laggs my comp, but I think it's the showing.

Another thing I've noticed, is that MoveMouseSmooth will move your actual mouse, even when SMART is blocked. A bit annoying.

I think I had one more thing that has problems, but I don't remember.

Would it be possible to block these procedures?

-Knives

Markus

2007-11-24 06:32:26

MoveMouseSmooth isn't overriden, and it sucks…

procedure TakeScreen(Reason: string);
begin
if(not Screenshots)then Exit;
try
SaveScreenshot(ScriptPath + reason + TimeRunning + '.bmp');
WriteLn('Screenshot of: ' + reason + TimeRunning);
except
Writeln('Failed to save screenshot of: ' + reason);
end
end;
SaveScreenshot doesn't take a screenie of SMART, but of the whole screen.
You need add this to Smart.scar (creds to MastaRaymond, he made this one).

Procedure SaveScreenshot(s : string);
var
TempBMP : integer;
TempS : String;
begin;
Temps := s;
While FileExists(Temps) do
begin;
Temps := ExtractFilePath(s) + Copy(ExtractFileName(Temps),1,LastPos('.',ExtractFileName(Temps))-1) + '2' + ExtractFileExt(s);
Writeln(Temps);
end;
TempBMP := BitmapFromString(765,503,'');
Try
CopyClientToBitmap(TempBMP,0,0,765,503);
SaveBitmap(TempBMP, Temps);
Except
end;
FreeBitmap(TempBMP);
end;