Jump to content




Screen logger


  • You cannot reply to this topic
12 replies to this topic

#1 KaoS

    Diabolical Coder

  • Members
  • 1,510 posts
  • LocationThat dark shadow under your bed...

Posted 22 October 2012 - 11:50 AM

Hey pro people, I am busy making a screen logger and resumer for a project of mine. everything is working fine except it will not take the term.scroll function into account.

I apologise that it is such a long code, the scroll modifier starts at line 104 but you may need to read the top part to understand how the record works, here is the pastebin: http://pastebin.com/JMUMUgUL

Thanks for the help

#2 KaoS

    Diabolical Coder

  • Members
  • 1,510 posts
  • LocationThat dark shadow under your bed...

Posted 22 October 2012 - 08:20 PM

no ideas guys? I added comments to the code to make it a little easier to understand, in order to fully understand it you need to understand metatables, before I understood them I tried Google and found an amazing article. in case you need it here is a link

#3 ChunLing

  • Members
  • 2,027 posts

Posted 22 October 2012 - 08:47 PM

Sorry, I'm fixing my code to get rid of ipairs (and do other stuff). This function still successfully calls the oterm.scroll, right? It just doesn't log correctly all the information you're trying to save. Which...are you trying to save the entire screen?

#4 KaoS

    Diabolical Coder

  • Members
  • 1,510 posts
  • LocationThat dark shadow under your bed...

Posted 22 October 2012 - 11:25 PM

exactly. as you write to your screen it writes to my log. it works perfectly except it doesn't scroll

#5 PixelToast

  • Signature Abuser
  • 2,265 posts
  • Location3232235883

Posted 22 October 2012 - 11:41 PM

mine just attaches perimeter hooks to all the term functions :3

#6 ChunLing

  • Members
  • 2,027 posts

Posted 23 October 2012 - 12:00 AM

Why are you trying to save the whole screen? The log already contains all the output information, you just need to log that the screen scrolled, not reiterate everything that was on the screen when it scrolled.

#7 KaoS

    Diabolical Coder

  • Members
  • 1,510 posts
  • LocationThat dark shadow under your bed...

Posted 23 October 2012 - 03:09 PM

I am moving everything up one in the log. it doesn't need everything ever entered, just what is currently on the screen

#8 ChunLing

  • Members
  • 2,027 posts

Posted 23 October 2012 - 04:27 PM

Looks more complicated than necessary. I have to let my brain recover a while before tackling it.

#9 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 23 October 2012 - 04:42 PM

You are doing this the hard way, you know. Why not just use a redirect target that updates a buffer table before calling the main term functions?

#10 KaoS

    Diabolical Coder

  • Members
  • 1,510 posts
  • LocationThat dark shadow under your bed...

Posted 23 October 2012 - 05:13 PM

I'm not sure how that works... anyways thanks for the help. I'll take a look

#11 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 23 October 2012 - 06:49 PM

An example of this would be found near the top of this file: https://github.com/l...b/master/window

That may be a useful reference or source of inspiration.

#12 KaoS

    Diabolical Coder

  • Members
  • 1,510 posts
  • LocationThat dark shadow under your bed...

Posted 24 October 2012 - 04:24 AM

Thanks, I am looking through it. the thing is I cannot find one instance of you actually calling the function new(). trying to figure out the syntax for target. guess I'll just look up the full code

but great code hey

EDIT: found it, I was thinking of doing it this way. I tried it in the past and made a mess of it. oh well, back to the drawing board ^_^/> time for an overhaul. thanks for the help Lyqyd, you too ChunLing. much appreciated

#13 KaoS

    Diabolical Coder

  • Members
  • 1,510 posts
  • LocationThat dark shadow under your bed...

Posted 24 October 2012 - 05:39 AM

lol still not working. I have a question. term.native.write ignores redirects right?





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users