SRL Archive - OSR Help

How do i get smarts canvas?


g0tp0t

2010-04-12 16:37:07

i thought i remembered using samrtgetcanvas, but thats not working… lol, confused

i luffs yeww

2010-04-12 16:38:44

GetClientDC(SmartGetDC); I think? That might be totally unrelated.. I need to sleep.

g0tp0t

2010-04-12 16:43:32

lol, ill try that, post again in a sec

=============

i had just put that ther, and i realised, nope lol, that will not return a canvas so i will get a type mismatch error.

TRiLeZ

2010-04-12 17:48:40

I gave you an example of how I draw my progress reports onto the SMART canvas, why didn't you look at it?

g0tp0t

2010-04-12 20:20:30

i did, lol, i think it owns, but that wont help be if smart isnt the client, what i mean is that 2 scripts with smart are running so i want both proggies in 1 smart screen

i luffs yeww

2010-04-12 20:22:26

I think you'll have to use SendInterSCARMessage.

g0tp0t

2010-04-13 09:13:57

:duh:how could i not have known:duh:lol im doing that right now. il post whether it works in a min. it should ^.^

iluffsyeww is a genuis

Sir R. M8gic1an

2010-04-13 09:18:53

Btw, you have to use the SMART debug canvas….

~RM

g0tp0t

2010-04-13 11:27:22

k, when i use this:

procedure takemypic;
var scrpic,buffer:integer;
begin
scrpic:= BitmapFromString2(false,'');
safecopycanvas(smartgetdc, buffer,0,0,505,735,0,0,200,300);
safecopycanvas(buffer, scrpic,0,0,505,735,0,0,200,300);
SaveBitmap(scrpic,'c:/scr/scrcom.bmp');
settimeout(1000,'takemypic');
end;

i get an access violation exception when it is called… but i used safe so im confused.
im doing this so i can then put it on a smart canvas in a different instance of smart


===========

ohh, i changed to smartgetdebugdc and no more violation :D, thanks rm, u own

==========
:( nvm i got the error way later. here is code:

procedure takemypic;
var scrpic,buffer:integer;
begin
scrpic:= BitmapFromString2(false,'');
safecopycanvas(smartgetdebugdc, buffer,0,0,505,735,0,0,200,300);
safecopycanvas(buffer, scrpic,0,0,505,735,0,0,200,300);
SaveBitmap(scrpic,'c:/scr/scrcom.bmp');
settimeout(1000,'takemypic');
end;

error:

[Runtime Error] : Exception: Access violation at address 004885B1 in module 'scar.exe'. Write of address 00000050 in line 1590 in script C:\Documents and Settings\Josh\My Documents\Downloads\V0.55 - RM Guild Miner.scar

Naum

2010-04-13 14:37:37

Try this:

procedure takemypic;
var scrpic,buffer:integer;
begin
scrpic:= BitmapFromString2(false,'');
safecopycanvas(smartgetdebugdc, buffer,0,0,505,735,0,0,200,300);
safecopycanvas(buffer, scrpic,0,0,505,735,0,0,200,300);
SaveBitmap(scrpic,ScriptPath+'scrcom.bmp');
settimeout(1000,'takemypic');
end;

g0tp0t

2010-04-14 12:10:39

the only dif is location, and i dont have scar on this comp so i will test later, but i dont see how that would help..?

i luffs yeww

2010-04-14 22:16:35

Because C:/scr/* is giving you an access denied. Doing ScriptPath + 'scrcom.bmp' should give it access, and allow it to save.

g0tp0t

2010-04-18 22:43:42

ohh, i thought access denied only happens in vista+ where apps are automaticly givin limited user privelages, lol