This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Dave-ee Jones's profile picture

EMAL - Event Monitoring and Logging

Started by Dave-ee Jones, 09 August 2017 - 04:25 AM
Dave-ee Jones #1
Posted 09 August 2017 - 06:25 AM
Hey,

Another quick script I whipped up for all those event loggers! This script logs all events (except "char" events, which is made completely mostly redundant by "key" events) and writes them to a file in the background, while you are using a shell or any OS (I believe. I didn't have time to go through every single OS out there..).

It has a little bit of customisation, allowing you to enable "bReplaceStartup" to set it as the startup file, in which it will rename the old one and automatically run it at startup. Also, you can change the log path (hooray!..).

This script can be useful for those who leave their computer running often and want to see what their sneaky "friends" are doing while they're not at the computer ( :ph34r:/>), or for those who just want some event logging (like Windows :D/>).

Pastebin: BvDaqbm1
Edited on 09 August 2017 - 10:25 PM
Lyqyd #2
Posted 09 August 2017 - 07:49 AM
Char events are not made redundant by key events. Capital letters and different symbol mapping are immediate counterexamples.
Dave-ee Jones #3
Posted 10 August 2017 - 12:29 AM
Char events are not made redundant by key events. Capital letters and different symbol mapping are immediate counterexamples.

True enough, but when you're going through a log and a whole page of your screen is just filled with a single key press (e.g. pressed "t") it gets a bit silly. The number of different key events like "key t", "key_up t", "char t" etc. it just gets crazy.
I think the computer could be a bit faster if they were incorporated into one because right now char and key are pushing the same events everytime you press a key uncapitalised. Besides, you can test if a key was capitalised if there was a Shift key pressed at the same time and if Caps Lock is on (have a toggle variable for it..).

But that's not my decision to make, so I make do with what is there. While it might make the computer SLIGHTLY slower it still allows for people to use it a bit easier and a bit more fluently in their programs, which is what I respect :)/>
The Crazy Phoenix #4
Posted 25 August 2017 - 06:11 PM
In that case you could include a log viewing utility that allows you to filter out certain types of events.
Dave-ee Jones #5
Posted 28 August 2017 - 01:15 AM
In that case you could include a log viewing utility that allows you to filter out certain types of events.

Yeah, that would be a good idea for the arguments. I might do that :)/>