Log Viewer

By Fulgore on May 11, 2006

Paste or load in your remotes and type /viewer or right click on channel, status, menubar or query to see your logs.

alias loader { return $findfile($logdir,*.log,0,1,aline -l @Log $nopath($1-)) }

alias viewer {
  window -Skal15 @Log 300 150 500 300 @Log Tahoma 12 | titlebar @Log Viewer
  aline 1 @Log 0,10 Logs !  $loader Log(s) Were Found
  aline 1 @Log -
  if ($1 != $null) { seefile 0 $1- }
}

alias seefile {
  if ( $isfile($2-) ) {
    loadbuf -rp @Log $+(",$2-,")
    if ( $1 == 0 ) { sline @Logs 10 | sline @Log 10 }
    else {
      sline @Log $calc($1 + 2) | sline @Log $calc($1 + 2)
      rline @Log $1 $line(@Log,$1)
    }
    if ( $fline(@Log,$nopath($2-),1,1)  ) { sline -l @Log $ifmatch }
  }
}

alias erase { var %lvar = $sline(@Log,0)
  while ( %lvar ) { .signal removefile @Log $sline(@Logs,%lvar).ln $+($logdir,$sline(@Log,%lvar)) | dec %lvar }
}

alias eraseall {
  var %lvar = $line(@Log,0,1)
  while ( %lvar ) { .signal removefile @Log %lvar $+($logdir,$line(@Log,%lvar,1)) | dec %lvar }
}

on *:signal:removefile: { .remove $+(",$3-,") | dline -l $1 $2 }

menu @Log {
  dclick: { if ( $1 ) { seefile 0 $+($logdir,$line(@Log,$1,1)) } }
  .$iif(!$sline(@Log,0),$style(2)) Erase: { erase }
  .-
  .Erase all: { eraseall }
  -
  Update: { window -c @Log | viewer }
  -
  Close: { window -c @Log }
  -
}

menu * {
Log Viewer:viewer
}

Comments

Sign in to comment.
AlexRapso   -  Jun 08, 2010

I can't get this to find any of my logs. I go into my mIRC program file and the logs are there but this log viewer won't show any of the logs. Is it something I did wrong or is it something else?

You had the same problem as me but i edited it abit i will show you what i have.

alias loader { 
  set %logpath C:\Users\Alex Rapso\AppData\Roaming\TraScript\logs\omerta\
  return $findfile(%logpath,*.log,0,1,aline -l @Log $nopath($1-)) 
}

alias viewer {
  window -Skal15 @Log 300 150 500 300 @Log Tahoma 12 | titlebar @Log Viewer
  aline 1 @Log 0,10 Logs !  $loader Log(s) Were Found
  aline 1 @Log -
  if ($1 != $null) { seefile 0 $1- }
}

alias seefile {
  if ( $isfile($2-) ) {
    loadbuf -rp @Log $+(",$2-,")
    if ( $1 == 0 ) { sline @Logs 10 | sline @Log 10 }
    else {
      sline @Log $calc($1 + 2) | sline @Log $calc($1 + 2)
      rline @Log $1 $line(@Log,$1)
    }
    if ( $fline(@Log,$nopath($2-),1,1)  ) { sline -l @Log $ifmatch }
  }
}
on *:signal:removefile: { .remove $+(",$3-,") | dline -l $1 $2 }

menu @Log {
  dclick: { if ( $1 ) { seefile 1 $+(%logpath,$line(@Log,$1,1)) } }
  -
  Update: { window -c @Log | viewer }
  -
  Close: { window -c @Log }
  -
}

menu * {
  Log Viewer:viewer
}

i changed the operator $logdir to variable %logpath and set the path to my log folder and changed all the other $logdir operators to %logpath and it should work hope i helped :)

 Respond  
Gemster   -  Jul 09, 2009
alias loader { return $findfile($logdir,*.log,0,1,aline -l @Log $nopath($1-)) }

.log I would change to .txt as most log systems use .txt files to log.

Well mine use .txt

Anyways very nice script.

Thanks
Gemster

 Respond  
xplo   -  Apr 29, 2009

how the hell can i make the "log file list" to be on the left. ? anyone..

 Respond  
eyiezinc   -  Apr 29, 2009

I love it too, 10/10

 Respond  
Escape-From-Hell   -  Nov 09, 2008

I love it, 10/10

 Respond  
yordan   -  Feb 19, 2008

works perfect for me im using 6.31 gread job!! 10/10

 Respond  
Eugenio   -  Dec 12, 2007

i got this error at first* /sline: invalid window (line 13, Log) but i changed the s to an $ and it works perfectly !!! this is amazing it has the first ever convo i had on mirc in every room great job !!!! Thank You Fulgore !!!!!

 Respond  
Metallboy100   -  Aug 22, 2007

good job

 Respond  
SpotRedDog   -  Jun 24, 2007

I can\'t get this to find any of my logs. I go into my mIRC program file and the logs are there but this log viewer won\'t show any of the logs. Is it something I did wrong or is it something else?

 Respond  
Ryuho   -  Jun 02, 2007
  • /aline: insufficient parameters (line 6, script.ini)

Works, but I get that prob

 Respond  
Fulgore   -  May 13, 2006

Emmm, I have to work on it PCTech.

 Respond  
PCTech   -  May 12, 2006

I like it, clean and simple. My mirc/logs folder has subfolder (for different networks) - any way to make your logviewer see the sub folders in the list?

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.