SRL Archive - News and General

How to make a log of everything that appears in the debug screen


StevenV

2012-08-14 12:41:38

hello,

in order to tell me were something little is going wrong,
i would like to save everything which appears in the debug screeen.
But i really have no idea how i can recall the debug info.

thanks

Olly

2012-08-14 13:02:42

You could use addToSRLLog('We did not the find the tree!');

and that will save it in the srl log in the simba folder somewhere ;)

StevenV

2012-08-14 13:10:06

but then i have to add this for every writeLn line, i'm more looking for something that just copies the debug and save it or just save the debug

Footy

2012-08-14 13:18:38

I think addtosrllog also prints to the debug, try it. make a script, and do addtosrllog('Hello'); If it prints to the debug aswell, just replace every writeln with AddToSRLLog.

StevenV

2012-08-14 13:50:26

yeah it prints to the debug, but i'm more looking for a command to just copy the entire debug screen and save it instead of replacing all the writeln's by AddToSRLLog

x[Warrior]x3500

2012-08-14 14:05:53

program new;
var
debugString:array of string;

procedure writelnEx(str:String);
begin
writeln(str);
setArrayLength(debugString,length(debugString)+1);
debugString[high(debugString)] := str;
end;

begin
writelnEx('hi ');
writelnEx('how are you ');
writelnEx('doing today ');
writeln(debugString);
end.

satkan

2012-08-14 15:34:53

Ah this is of my interests.

Pre-scripting runescape, i would want to make a motion sensor with my webcam using simba.
Then write motion detects to a log file ofcourse.

x[Warrior]x3500

2012-08-14 15:42:30

From: satkan
Ah this is of my interests.

Pre-scripting runescape, i would want to make a motion sensor with my webcam using simba.
Then write motion detects to a log file ofcourse.


well this just depends on how simplistic u want it to be. if you have a way of viewing your cam's video then all you have to do (for a very very simplistic motion sensor) is use averagePixelShift to see if anything has moved infront of the cam. then use theTime variable and record that

satkan

2012-08-14 16:01:03

From: x[Warrior]x3500
well this just depends on how simplistic u want it to be. if you have a way of viewing your cam's video then all you have to do (for a very very simplistic motion sensor) is use averagePixelShift to see if anything has moved infront of the cam. then use theTime variable and record that


Yeah, that's the plan to start with.
Then I'll look more into skin color or something commonly human.
Maybe thereafter screenshot support etc.

It's just a way to learn pascal really. ^^ Anyways, thanks for letting me know the method i should call to.
(well, in java it would be a method, i don't know about pascal.)


[E] Would i be able to play a sound file with Simba (Like in make the script open File/Sounds/Sound.midi)? Just wondering if it could.

StevenV

2012-08-14 18:30:46

it's not really what i'm looking for
i do not want to replace the writeln lines, i'm just looking for a way to copy the debug screen, something like print screen, but instead it does not take a bitmap, but a text file