home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
napalm.napnet.hu
/
2015-02-12.napalm.napnet.hu.tar
/
napalm.napnet.hu
/
programok
/
kommunikacio
/
mpp700.exe
/
nGZIPn.mrc
< prev
next >
Wrap
Text File
|
2003-05-13
|
3KB
|
112 lines
; nGZIPn.DLL sample (c) 2001 Necroman - necroman@europe.com, #mIRC @ Undernet
on *:start: {
; if ($version < 5.8) { ;echo -a Sorry - this sample needs mIRC 5.8x | .disable #nGZIPn }
; elseif ($isfile(nGZIPn.dll) == $false) { ;echo -a Sorry - this sample needs GZIP.DLL in the ' $+ $mircdir $+ ' folder | .disable #nGZIPn }
; else {
; ;echo -a Found $dll(nGZIPn,version,0)
; ;echo -a Type /gz to start the sample
.enable #nGZIPn
; }
}
#ngzipn on
alias gz { dialog -md nGZIPn nGZIPn }
alias -l nGZIPn { return $dll(nGZIPn,zip,$1-) }
alias -l gunzip { return $dll(nGZIPn,unzip,$left($1-,-3)) }
alias -l list_dir {
did -r nGZIPn 50,90
var %files = $findfile($did(nGZIPn,20),*.*,0,1,did -ia nGZIPn $iif($right($1-,3) == .gz,90,50) $nopath($1-))
}
on *:dialog:nGZIPn:init:0:{
did -ra nGZIPn 20 $mircdir
list_dir
}
on *:dialog:nGZIPn:sclick:*:{
;compressed files
if ($did == 50) {
did -u nGZIPn 90
var %c = $did(50,0).sel, %size = 0, %d = %c
while %c {
var %file = $did(20) $+ $did(50,$did(50,%c).sel)
%size = %size + $file(%file).size
dec %c
}
did -ra nGZIPn 100 %size bytes in %d file(s)
}
;uncompressed files
if ($did == 90) {
did -u nGZIPn 50
var %c = $did(90,0).sel, %size = 0, %d = %c
while %c {
var %file = $did(20) $+ $did(90,$did(90,%c).sel)
%size = %size + $file(%file).size
dec %c
}
did -ra nGZIPn 100 %size bytes in %d file(s)
}
;choose directory
if ($did == 30) {
var %dir = $sdir($did(20))
if %dir { did -ra nGZIPn 20 %dir }
list_dir
}
;compress
if ($did == 60) {
var %c = 1, %d = $did(50,0).sel
while (%c <= %d) {
var %file = $did(20) $+ $did(50,$did(50,%c).sel)
did -ra nGZIPn 100 Zipping file: %file
if ($true != $nGZIPn(%file)) { did -ra nGZIPn 100 Unable to zip: %file | break }
inc %c
}
list_dir
did -ra nGZIPn 100 %d file(s) zipped OK
}
;decompress
if ($did == 70) {
var %c = 1, %d = $did(90,0).sel
while (%c <= %d) {
var %file = $did(20) $+ $did(90,$did(90,%c).sel)
did -ra nGZIPn 100 Unzipping file: %file
if ($true != $gunzip(%file)) { did -ra nGZIPn 100 Unable to unzip: %file | break }
inc %c
}
list_dir
did -ra nGZIPn 100 %d file(s) unzipped OK
}
}
;Dialog Grabber 5.82 - date: 29.01.2001
;(c) 2000 Necroman - necroman@europe.com, irc://irc.undernet.org/mIRC
dialog nGZIPn {
title "nGZIPn Sample"
size -1 -1 273 127
option dbu
text "Current folder", 10, 6 6 108 6, group
edit "", 20, 6 16 228 10, autohs
button "...", 30, 240 16 24 10
text "Uncompressed files", 40, 6 32 57 6, group
list 50, 6 42 114 71, sort, extsel, size, hsbar, vsbar
button ">>", 60, 126 55 21 19
button "<<", 70, 126 81 21 19
text "Compressed files", 80, 153 32 60 6, group
list 90, 153 42 114 71, sort, extsel, size, hsbar, vsbar
text "Ready", 100, 6 117 261 10, group
button "fake1", 110, 510 3 9 6, ok
button "fake2", 120, 510 3 9 6, default
}
#nGZIPn end