Zip — File Browser
Zipv1.0 / Zipv1.0 / zip / zip.ini
zip.ini — 3.01 KB — Download this file
[script]
n0=;; Zip v1.0 by nix2k
n1=;; DLL by mc68000
n2=
n3=menu menubar {
n4= -
n5= Zip:{ dialog -m zip zip }
n6=}
n7=alias zipdiag { dialog -m zip zip }
n8=alias _zip { return $+(",$scriptdirzip.dll,") }
n9=alias _dozip { return $dll($_zip,_zip, -d $+(",%zip.dir,$1,") $+(",%zip.location,")) }
n10=alias _dozipr { return $dll($_zip,_zip, -r $+(",%zip.dir,$1,") $+(",%zip.location,")) }
n11=alias _zipebox { return $input($1-,oh,Zip Error) }
n12=alias _zipabox { return $input(Zip Version 1.0 $+ $crlf $+ Script by nix2k $+ $crlf $+ DLL by mc68000,io,About Zip...) }
n13=
n14=dialog zip {
n15= title "Zip"
n16= size -1 -1 265 235
n17=
n18= button "Select Directory", 1, 5 5 150 20
n19= list 2, 5 30 150 200, extsel size
n20= box "Zip:", 3, 160 26 100 100
n21= radio "Selected Files", 4, 165 41 90 14, group
n22= radio "Directory", 5, 165 56 90 14
n23= radio "Directory (Recursive)", 6, 165 71 75 28, multi
n24= button "Zip Files", 7, 165 101 90 20
n25= button "About", 8, 160 210 50 20
n26= button "Close", 9, 210 210 50 20, cancel
n27=}
n28=on *:DIALOG:zip:*:*:{
n29= if ($devent == init) {
n30= set %zip.action file
n31= set %zip.dir $mircdir
n32= return $findfile(%zip.dir,*.*,0,1,did -a zip 2 $nopath($1-))
n33= did -c zip 4
n34= }
n35= if ($devent == sclick) {
n36= if ($did == 1) { set %zip.dir $$sdir("Select a directory") | did -r zip 2 | return $findfile(%zip.dir,*.*,0,1,did -a zip 2 $nopath($1-)) }
n37= if ($did == 4) { set %zip.action file }
n38= if ($did == 5) { set %zip.action dir }
n39= if ($did == 6) { set %zip.action dirrec }
n40= if ($did == 7) {
n41= if (%zip.action == file) {
n42= if ($did(zip,2,0).sel == 0) { _zipebox No file(s) selected. You must select at least one file to zip. | return }
n43= set %zip.location $$sfile($mircdir,Save as...,Save)
n44= if ($right(%zip.location,4) !== .zip) { set %zip.location %zip.location $+ .zip }
n45= var %sel $did(zip,2,0).sel
n46= var %loop 2
n47= _dozip %text $did(zip,2,$did(zip,2,1).sel).text
n48= while (%loop <= %sel) { _dozip $did(zip,2,$did(zip,2, [ %loop ] ).sel).text | inc %loop }
n49= }
n50= if (%zip.action == dir) {
n51= if (%zip.dir == $null) { _zipebox No directory has been set. You must select a directory before attempting to zip. | return }
n52= set %zip.location $$sfile($mircdir,Save as...,Save)
n53= if ($right(%zip.location,4) !== .zip) { set %zip.location %zip.location $+ .zip }
n54= _dozip *
n55= }
n56= if (%zip.action == dirrec) {
n57= if (%zip.dir == $null) { _zipebox No directory has been set. You must select a directory before attempting to zip. | return }
n58= set %zip.location $$sfile($mircdir,Save as...,Save)
n59= if ($right(%zip.location,4) !== .zip) { set %zip.location %zip.location $+ .zip }
n60= _dozipr *
n61= }
n62= }
n63= if ($did == 8) { _zipabox }
n64= }
n65= if ($devent == close) { unset %zip.* }
n66=}