SRL Archive - S.M.A.R.T. Questions and Answers.

SaveScreenshot with SMART Graphics on that picture?


ineedbot

2014-06-08 19:44:46

Is it possible? I'd love to have it for on screen paint progress reports. Thanks.

tls

2014-06-08 20:44:13

Just add the smart bitmap to a bitmap of the targeted client and save it.

Nebula

2014-06-08 21:30:57

just use the procedure SaveScreenshot(filename:string);

ineedbot

2014-06-09 00:21:28

From: tls
Just add the smart bitmap to a bitmap of the targeted client and save it.

I've been messing around with

Proggie:=SMART_Canvas.ToTBitmap;
Proggie.SaveToFile(ScriptPath+'ineedbots AIO Fisher.bmp');
But its only spitting out a black image or an empty file…

EDIT: wait nvm its working.. But it is possible to somehow combine the Game's graphics and SMART's graphics? Rather than having just text and stuff on a black canvas.

From: Nebula
just use the procedure SaveScreenshot(filename:string);

Thats what ive been using, but its not grabbing the SMART graphics, only the game's graphics.

Olly

2014-06-09 01:18:19


getClientDimensions(w, h);
bmp := bitmapFromClient(0, 0, w-1, h-1);
fastDrawTransparent(0, 0, smartCanvas.index, bmp);
saveBitmap(bmp, 'hello.png');
freeBitmap(bmp);

ineedbot

2014-06-09 10:51:22

From: Olly

getClientDimensions(w, h);
bmp := bitmapFromClient(0, 0, w-1, h-1);
fastDrawTransparent(0, 0, smartCanvas.index, bmp);
saveBitmap(bmp, 'hello.png');
freeBitmap(bmp);


Tried it and its working but not. It completely covers the client picture and overwrites it with black. I offseted the smartcanvas to show you whats happening

Olly

2014-06-09 11:33:08

try SetTransparentColor(bmp, 0); before the FastDrawTransparent.

ineedbot

2014-06-09 20:34:37

From: Olly
try SetTransparentColor(bmp, 0); before the FastDrawTransparent.


Thanks I got it working! With
getClientDimensions(w, h);
bmp := bitmapFromClient(0, 0, w-1, h-1);
SetTransparentColor(smart_Canvas.index, 0);
fastDrawTransparent(0, 0, smart_Canvas.index, bmp);
saveBitmap(bmp, 'c:\hello.png');
freeBitmap(bmp);