Drahkuna Beginner
Joined: 15 Apr 2005 Posts: 15 Location: MO
|
Posted: Thu Jul 13, 2006 12:48 am
My EasyLog script |
#CLASS {EasyLog}
#ALIAS do_log {
logging = 1
#lo %time
#say %ansi( 15)~[%ansi( 10)Logging Enabled%ansi( 15)~]
}
#ALIAS end_log {
logging = 0
#lo
#say %ansi( 15)~[%ansi( 12)Logging Disabled%ansi( 15)~]
}
#ALIAS clearlog {
log_end_record=""
log_start_record=""
#say ~<b>*Log record cleared*~</b>
}
#ALIAS logdisplay {
#show ~<color darkorange>"==========================="~</color>
#loopdb @log_start_record {
#mxp ~<color red>~<b>%key~</b>~</color>
#addi log_to_send %key
}
#show ~<color green>--------********--------********--------~</color>
#loopdb @log_end_record {#show ~<color white>~<b>%key~</b>~</color>}
#show ~<color darkorange>"==========================="~</color>
}
#ALIAS showlog {
log_number=%1
#launch {notepad.exe %item( @log_to_send, @log_number)}
}
#VAR logging {0} {0}
#VAR log_start {}
#VAR log_start_record {}
#VAR log_end {}
#VAR log_end_record {}
#VAR log_to_send {}
#VAR log_number {}
#TRIGGER {Log is on: &log_start$} {#addkey log_start_record @log_start}
#TRIGGER {Log is off$} {
log_end=%time
#addkey log_end_record @log_end
}
#BUTTON 1 {Logging Disabled} {#if (!@logging) {do_log} {end_log}} {Logging Enabled} {#if (@logging) {end_log} {do_log}} {} {1} {} {} {} {} {} {} {} {79} {47} {} {} "" {} {} {log_toggle}
#CLASS 0
A little logging script that keeps track of recent logs and allows you to access the logs through a simple alias.
LOGDISPLAY - shows a list of recent logs, the start date/time's in red and end date/time's in white.
CLEARLOG - empties the log record.
SHOWLOG <#> - opens the log file corresponding to its position in the log record. i.e. if the log at the very top of your list is "Log of July 11th, 2006...", typing in SHOWLOG 1 will open up the file titled "Log of July 11th, blah blah, .txt" |
|