alias whilefix { dll $shortfn($mircdirloglar\dll\WhileFix.dll) WhileFix . }
alias mdxdll return $shortfn(loglar\dll\mdx.dll)
alias bars return $shortfn(loglar\dll\bars.mdx)
alias _views return $shortfn(loglar\dll\views.mdx)
alias _mdx dll $shortfn($mdxdll) $1-
alias _mdxinit dll $shortfn($mdxdll) SetMircVersion $version | dll $shortfn($mdxdll) MarkDialog $dname
menu channel,status,query,menubar {
-
Loglar:loglar
}
dialog loglar {
title " Log Gösterici Addon v1.0 - http://www.mircteyiz.com"
size -1 -1 175 165
option dbu
icon loglar\icon\log.ico
text "", 12, 3 2 170 24
list 13, 144 2 22 25, size disable
text "Log Gösterici Addon v1.0", 14, 7 3 100 10
text "Kanal veya özel logu seçerek, bak düğmesine basınız", 15, 7 15 135 8
box "", 16, 3 25 170 4
list 1, 2 45 171 99, size
button "Bak", 5, 3 151 37 12
button "Sil", 6, 41 151 37 12
box "", 9, 3 144 170 4
button "Tamam", 10, 135 151 37 12, ok
list 2, 3 32 96 14, size
}
alias loglar { dialog -m loglar loglar }
on *:dialog:loglar:init:*: {
_mdxinit
_mdx SetBorderStyle $dname 12,14,15
_mdx SetControlMDX $dname 13 toolbar flat list nodivider arrows > $bars
did -i $dname 13 1 bmpsize 35 35
_mdx SetBorderStyle $dname 13
_mdx SetColor $dname 13 background $rgb(255,255,255)
did -i $dname 13 1 setimage +nhd 0 icon large loglar/icon/log.ico
did -i $dname 13 1 bwidth 200 200
did -a $dname 13 1 a
_mdx SetColor $dname 12,14,15 background $rgb(255,255,255)
_mdx SetColor $dname 12,14,15 textbg $rgb(255,255,255)
_mdx SetFont $dname 14 18 600 Tahoma
;_mdx SetBorderStyle $dname 9 staticedge
_mdx SetFont $dname 5,6,9 13 600 Tahoma
_mdx SetBorderStyle 2 windowedge
_mdx SetControlMDX 2 Toolbar list nodivider arrows > $bars
_mdx SetControlMDX $dname 1 ListView report nosortheader rowselect single grid headerdrag > $_views
did -i $dname 1 1 headerdims 120 140 78
did -i $dname 1 1 headertext +c Kanal Logları $chr(9) Tarih $chr(9) Satır sayısı
var %i = did -i $dname 2 1 setimage +ndh icon small, %a = did -a $dname 2
did -i $dname 2 1 bmpsize 16 16
%i loglar/icon/kanal.ico
%a 1 Kanal Logları
%i loglar/icon/user.ico
%a 2 Özel Logları
%lg = $findfile($logdir,*.log,0,klog $1-)
kloglar
}
on *:dialog:loglar:sclick:*:{
if ($did == 2) {
if ($did(2).sel == 2) { kloglar | did -i $dname 1 1 headertext +c Kanal Logları $chr(9) Tarih $chr(9) Satır sayısı }
if ($did(2).sel == 3) { pvloglar | did -i $dname 1 1 headertext +c Özel Logları $chr(9) Tarih $chr(9) Satır sayısı }
}
if ($did == 5) { if ($did(1).sel > 0) { göster- $gettok($did(1).seltext,6,32) } }
if ($did == 6) { if ($did(1).sel > 0) { .remove logs\ $+ $gettok($did(1).seltext,6,32) $+ .log | did -d $dname 1 $did(1).sel | did -c $dname 1 1 } }
if ($did == 10) { window -c @Loglar }
}
on *:dialog:loglar:dclick:*:{
clear @Loglar | göster- $gettok($did(1).seltext,6,32)
}
alias kloglar {
did -r loglar 1
%lg = $findfile($logdir,*.log,0,klog $1-)
}
alias pvloglar { did -r loglar 1 | %lg = $findfile($logdir,*.log,0,pvlog $1-) }
alias klog {
if $left($nopath($1-),1) == $chr(35) {
var %l = $read($1-,2)
var %z = $lines($1-)
whilefix
did -a loglar 1 $remove($nopath($1-),.log) $chr(9) $gettok(%l,4-,32) $chr(9) %z
}
}
alias pvlog {
if $left($nopath($1-),1) != $chr(35) {
var %l = $read($1-,2)
var %z = $lines($1-)
whilefix
did -a loglar 1 $remove($nopath($1-),.log) $chr(9) $gettok(%l,4-,32) $chr(9) %z
}
}
alias göster- {
if (!$window(@Loglar)) window -e @Loglar
var %a = 1
var %b = logs\ $+ $1 $+ .log
if ($window(@Loglar)) loadbuf @Loglar %b
;var %c = $lines(%b)
;while (%a <= %c) {
; whilefix
; if ($window(@Loglar)) echo @Loglar $iif($read(%b,%a) != $null,$read(%b,%a),$chr(160))
; inc %a
;}
}
menu @Loglar {
Ekrani Sil:clear
}
Hiç yorum yok:
Yorum Gönder