Log Viewer

За всичко свързано с mIRC
Post Reply
User avatar
Paina
Турист
Турист
Posts: 294
Joined: Sat Jul 15, 2006 7:08 pm

Log Viewer

Post by Paina » Fri Sep 29, 2006 6:37 pm

С това кодче си правите нещо като мирк програмка с която можете лесно да преглеждате логовете :)
Отваряте Remote (alt+r) правите ново файлче от File>New Пействате го там и давате ОК.
Сега в Средното падащо меню търсите LogViewer и от там си избирате кой лог да четете ( ако имате такива)

Code: Select all

;LogViewer System  by Dream_Weaver


on *:load:{
  /echo -a LogViewer by Dream_Weaver
  /echo -a Usage: /logview
}
menu @LogViewer {
  dclick if ((*.* iswm $sline($active,1)) && ($exists( [ logs\ $+ [ $sline($active,1) ] ] ))) { clear -a | titlebar $active - $sline($active,1) - $bytes($file( [ logs\ $+ [ $sline($active,1) ] ] ).size) | loadbuf -p $active logs\ $+ $sline($active,1) } 
  $iif($sline($active,1), [ $sline($active,1) ] ):if ((*.* iswm $sline($active,1)) && ($exists( [ logs\ $+ [ $sline($active,1) ] ] ))) { clear -a | titlebar $active - $sline($active,1) - $bytes($file( [ logs\ $+ [ $sline($active,1) ] ] ).size) | loadbuf -p $active logs\ $+ $sline($active,1) } 
  -
  Refresh:logview
  Clear Screen:clear $active 
  -
  $iif($sline($active,1),Delete):if ($?!="Are you sure you want to remove $+ $crlf $+ $sline($active,1) $+ ?") { .remove logs\ $+ $sline($active,1) | logview }
  -
  Close:window -c $active
}
alias logview {
  if ($window(@logviewer)) { window -c @logviewer }
  if ($1) && ($exists($bind($logdir,$1,.log))) {
    if ($window(@logview)) { clear @logview }
    else { window -k +e @LogView -1 -1 500 320 }
    var %§.file = $bind($logdir,$1,.log)
    titlebar @LogView - $1 - $bytes($file(%§.file).size)
    loadbuf -p @logview %§.file
    halt
  }
  window -kSl15 +e @LogViewer -1 -1 600 320
  :loop | inc -u %§.i | if ($findfile($logdir,*.log,%§.i) == $null) { titlebar @LogViewer - Right click for menu | halt }
  aline -l @LogViewer $nopath($findfile($logdir,*.log,%§.i))
  goto loop
}
menu menubar,status,channel,query {
  °LogViewer°:/logview
}

Post Reply