aIRC — File Browser
aIRCv0.8.69 / aIRCv0.8.69 / addons / sound4.mrc
sound4.mrc — 20.2 KB — Download this file
;/**********************************************************************
; *
; * aIRC
; * Sound System (aircpster)
; *
; **********************************************************************/
;
;;
;
; -( aIRCpster )-
;
;;
alias aircpster { _dialog -m _aircpster _aircpster }
CTCP *:SLOTS:#:{ _aircpster.slotsctcp $nick $2- }
ON *:NICK:{
_aircpster.chnickslots $nick $newnick
_aircpster.transfers.chnick $nick $newnick
}
#_soundno@findquery off
ON ^*:OPEN:?:{
if ($dialog(_aIRCpster) == $null) || ($comchan($nick,0) == 0) { return }
tokenize 32 $strip($1-)
if (!?* *.mp?* iswm $1-) {
if ($_aircpster.parsefindreply($1,$2-)) { halt }
return
}
if (& !?* *.mp?* iswm $1-) {
if ($_aircpster.parsefindreply($2,$3-)) { halt }
return
}
if (*copy*paste iswm $1-) || (match isin $1-) || (found isin $1-) || (list isin $1-) { halt }
}
#_soundno@findquery end
ON *:TEXT:*!?* *.mp?*:?:{
tokenize 32 $strip($1-)
if (!?* *.mp?* iswm $1-) && ($_aircpster.parsefindreply($1,$2-)) { return }
if (& !?* *.mp?* iswm $1-) && ($_aircpster.parsefindreply($2,$3-)) { return }
}
alias -l _aircpster.parsefindreply {
if ($right($1,-1) != $me) {
_aircpster.addreq @find $nick $_sound.parse($2-)
return 1
}
return 0
}
alias _aircpster.slotsctcp {
var %d = _aircpster,%90 = $chr(9) $+ 0
if ($dialog(%d) == $null) { return }
var %nick = $1
tokenize 32 $2-
if ($0 >= 7) && ($_isint($_nospaces($1-2,$4-7))) {
var %m = ? 0 %nick $+ $chr(9) $+ *,%tmp = - 0 %nick $+ %90 $calc($1 - $2) $+ / $+ $2 $+ %90 $4 $+ / $+ $5 $+ %90 $3 $+ %90 $7 $+ %90 $6 $+ %90 $asctime($ctime,mmm dd/HH:nn) $+ %90 $ctime $+ %90 $8-
if ($didwm(%d,1301,%m,1)) { did -d %d 1301 $ifmatch }
did -i %d 1301 2 %tmp
}
}
alias -l _aircpster.chnickslots {
var %d = _aircpster
if ($dialog(%d) == $null) { return }
var %m = ? 0 $1 $+ $chr(9) $+ *
if ($didwm(%d,1301,%m,1)) {
var %l = $ifmatch,%tmp = - 0 $2 $+ $chr(9) $+ $gettok($did(%d,1301,%l),2-,9)
did -o %d 1301 %l %tmp
}
}
alias _aircpster.addreq {
var %d = _aircpster
if ($dialog(%d) == $null) { return }
if (*.mp3 !iswm $3-) && (*.mp2 !iswm $3-) { return }
var %90 = $chr(9) $+ 0,%type = $1,%nick = $2,%file = $3-
; var %m = ? 0 %nick $+ $chr(9) $+ 0 %file $+ $chr(9) $+ 0 * $+ $chr(9) $+ 0 &
; if ($didwm(%d,1101,%m,1)) { did -d %d 1101 $ifmatch }
did -i %d 1101 2 - 0 %nick $+ %90 %file $+ %90 $asctime($ctime,mmm dd/HH:nn) $+ %90 %type $+ %90 $ctime
}
dialog _aircpster {
size -1 -1 300 177
option dbu
title "aIRCpster"
tab "Grabber",1001,5 0 290 160
tab "Filter",1002
tab "Slots",1003
list 1101,10 30 280 110,tab 1001 size extsel
text "Double click to request:",1102,10 20 70 10,tab 1001
button "Filter",1103,10 145 30 12,tab 1001
button "Del Lines",1104,42 145 30 12,tab 1001
button "Del Dead",1105,74 145 30 12,tab 1001
button "Clear",1106,106 145 30 12,tab 1001
button "Save",1107,138 145 30 12,tab 1001
button "Load",1108,170 145 30 12,tab 1001
button "Import",1109,202 145 30 12,tab 1001
list 1201,10 30 280 110,tab 1002 size extsel
text "Double click to request:",1202,10 20 70 10,tab 1002
button "Filter",1203,10 145 30 12,tab 1002
button "Del Lines",1204,42 145 30 12,tab 1002
button "Del Dead",1205,74 145 30 12,tab 1002
button "Clear",1206,106 145 30 12,tab 1002
button "Save",1207,138 145 30 12,tab 1002
list 1301,10 30 280 110,tab 1003 size extsel
text "Double click to filter:",1302,10 20 70 10,tab 1003
text "Commands:",1303,10 147 28 10,tab 1003
combo 1304,40 145 50 100,tab 1003 drop
button "Send",1305,92 145 30 12,tab 1003
button "Del Lines",1306,124 145 30 12,tab 1003
button "Del Dead",1307,156 145 30 12,tab 1003
button "Clear",1308,188 145 30 12,tab 1003
button "Close",2990,260 145 30 12,cancel
list 2992,5 163 290 12,size
; button "MDX ContextHelp",2991,10 120 30 15,hide
button "MDX Positioner",2993,10 10 10 10,hide
}
alias _aircpster.status {
if ($dialog(_aircpster)) { did -i _aircpster 2992 2 +b 0 $1- }
}
ON *:DIALOG:_aircpster:init:0:{
_mdx.init $_icofile(aircpster.ico,$scriptdir) title border sysmenu minbox
_mdx.SetControlMDX dialog.mdx $dname 2993 Positioner minbox
; _mdx.SetControlMDX dialog.mdx $dname 2991 ContextHelp
var %9+0 = $chr(9) $+ +l 0,%9r0 = $chr(9) $+ +r 0
_mdx.SetControlMDX bars.mdx $dname 2992 StatusBar
did -i $dname 2992 1 setparts -1
_aircpster.status Ready
_mdx.SetControlMDX views.mdx $dname 1101 ListView headerdrag report rowselect showsel nosortheader
did -i $dname 1101 1 header $_mdx.fixtablengths(50,130,40,40,0) + 0 Nick $+ %9+0 File $+ %9+0 GrabTime $+ %9+0 GrabType $+ %9+0 Ctime
_mdx.SetControlMDX views.mdx $dname 1201 ListView headerdrag report rowselect showsel nosortheader
did -i $dname 1201 1 header $_mdx.fixtablengths(50,130,40,40,0) + 0 Nick $+ %9+0 File $+ %9+0 GrabTime $+ %9+0 GrabType $+ %9+0 Ctime
_mdx.SetControlMDX views.mdx $dname 1301 ListView headerdrag report rowselect showsel nosortheader
did -i $dname 1301 1 header $_mdx.fixtablengths(50,25,25,35,25,30,40,0,38) + 0 Nick $+ %9+0 Slots $+ %9+0 Ques $+ %9+0 Next Send $+ %9r0 Files $+ %9r0 MaxCps $+ %9+0 SlotsTime $+ %9+0 Ctime $+ %9+0 Comment
didtok $dname 1304 32 @nick @nick-que @nick-stats @nick-cancel @nick-remove @nick-help @nick-top @nick-top10
did -c $dname 1304 1
_aircpster.tabsbugworkaround
}
ON *:DIALOG:_aircpster:sclick:1001,1002,1003:{ _aircpster.tabsbugworkaround }
ON *:DIALOG:_aircpster:dclick:1101,1201:{ _aircpster.request }
ON *:DIALOG:_aircpster:sclick:1103,1203:{ _aircpster.filter }
ON *:DIALOG:_aircpster:sclick:1104,1204,1306:{ _aircpster.delsels }
ON *:DIALOG:_aircpster:sclick:1105,1205,1307:{ _aircpster.deldead }
ON *:DIALOG:_aircpster:sclick:1106,1206,1308:{ _aircpster.clear }
ON *:DIALOG:_aircpster:sclick:1107,1207:{ _aircpster.save }
ON *:DIALOG:_aircpster:sclick:1108:{ _aircpster.load }
ON *:DIALOG:_aircpster:sclick:1109:{ _aircpster.import }
ON *:DIALOG:_aircpster:dclick:1301:{ _aircpster.slots.filter }
ON *:DIALOG:_aircpster:sclick:1305:{ _aircpster.slots.send }
;;;bug;;; Dll bug
alias -l _aircpster.tabsbugworkaround {
if ($dialog($dname).tab == 1003) {
_mdx.MoveControl $dname 1301 $calc(10 * $dbuw) $calc(30 * $dbuh)
did -v $dname 1301
}
else {
_mdx.MoveControl $dname 1301 $calc(10 * $dbuw) $calc(300000 * $dbuh)
did -h $dname 1301
}
}
alias -l _aircpster.filter { return $dialog(_aircpster.filter,_aircpster.filter,-4) }
alias -l _aircpster.clear {
var %d = $dname,%id = $left($did,3) $+ 1,%r = $did(%d,%id).lines - 1
did -r %d %id
if (%r) { _aircpster.status List cleared, removed $_nsingoplur($ifmatch,line,lines) }
else { _aircpster.status No lines to remove }
}
alias -l _aircpster.delsels {
var %ticks = $ticks,%r = 0,%d = $dname,%id = $left($did,3) $+ 1,%sels = $did(%d,%id,0).sel
if (%sels > 200) && ($_not($_yesno(1,aIRCpster [/aircpster],1,There are [ %sels ] selected lines. This operation may take a while<CRLF>Do you want to continue?))) { return }
_aircpster.status Removing selected lines...
if (%sels) {
_progress.init aIRCpster: Removing selected lines...
while ($did(%d,%id,1).sel) {
did -d %d %id $ifmatch
inc %r
if (10 // %r) { _progress2 %r %sels %r / %sels }
}
_progress 100 Done!
}
if (%r) { _aircpster.status Removed $_nsingoplur($ifmatch,line,lines) ( $+ $calc(($ticks - %ticks) / 1000) secs) }
else { _aircpster.status No selected lines to remove }
}
alias -l _aircpster.deldead {
var %ticks = $ticks,%d = $dname,%id = $left($did,3) $+ 1,%n = $did(%d,%id).lines,%r = 0,%lines = %n - 1,%m = 1,%wino = @__aircpsterdeldeado,%wins = @__aircpsterdeldeads,%wint = @__aircpsterdeldeadt,%nick
if (%lines > 1000) && ($_not($_yesno(1,aIRCpster [/aircpster],1,There are [ %lines ] lines. This operation may take a while<CRLF>Do you want to continue?))) { return }
_aircpster.status Removing obsolete lines...
if (%lines) {
_progress.init aIRCpster: Removing obsolete lines...
_openwins %wino %wins %wint
filter -iwr 2-999999999 %d %id %wino *
while ($gettok($gettok($line(%wino,1),3,32),1,9) != $null) {
%nick = $ifmatch
_progress2 $calc(%lines - $line(%wino,0)) %lines %nick
if ($comchan(%nick,0)) { filter -ww %wino %wins & & %nick $+ $chr(9) $+ * }
filter -wwcx %wino %wint & & %nick $+ $chr(9) $+ *
filter -wwc %wint %wino *
}
filter -woceut 5 9 %wins %d %id *
%r = %lines - $line(%wins,0)
_progress 100 Done!
}
if (%r) { _aircpster.status Removed $_nsingoplur(%r,obsolete line,obsolete lines) ( $+ $calc(($ticks - %ticks) / 1000) secs) }
else { _aircpster.status No obsolete lines to remove. ( $+ $calc(($ticks - %ticks) / 1000) secs) }
}
alias -l _aircpster.save {
var %d = _aircpster,%id = $did - 6,%file,%total = 0
%file = $$dir="Enter a file to save:" usr\list.aIRCpster
if ($isfile(%file)) && ($_not($_filexists(0,aIRCpster [/aircpster],%file))) { return }
if ($dialog(%d) == $null) { return }
var %ticks = $ticks,%win = @__aircpstersave,%file = " $+ %file $+ "
_openwins %win
filter -iwr 2- $+ $calc($did(%d,%id).lines + 10) %d %id %win *
%total = $line(%win,0)
iline %win 1 //aIRCpster 1 %total
savebuf %win %file
close -@ %win
_aircpster.status Saved $_nsingoplur(%total,line,lines) to $replace(%file,",') ( $+ $calc(($ticks - %ticks) / 1000) secs)
}
alias -l _aircpster.load {
var %d = _aircpster,%id = $did - 7,%file,%total = 0
%file = $$dir="Select an aIRCpster list to load:" usr\list.aIRCpster
if ($dialog(%d) == $null) { return }
if ($isfile(%file)) {
var %ticks = $ticks,%win = @__aircpsterload,%file = " $+ %file $+ ",%line = $read -nl1 %file
if (//aIRCpster * !iswm %line) || ($numtok(%line,32) != 3) || ($_not($_isint($_nospaces($gettok(%line,2-,32))))) {
_aircpster.status ERROR: Invalid aIRCpster list file: %file
return
}
_openwins %win
filter -fwr 2- $+ $calc($lines(%file) + 10) %file %win *
%total = $line(%win,0)
filter -woc %win %d %id *
close -@ %win
_aircpster.status Loaded $_nsingoplur(%total,line,lines) from $replace(%file,",') ( $+ $calc(($ticks - %ticks) / 1000) secs)
}
else { _aircpster.status ERROR: File not found: %file }
}
dialog _aircpster.filter {
size -1 -1 100 108
option dbu
title "aIRCpster - Filter"
check "Files must match:",1001,5 5 70 8
edit "",1002,10 15 85 10,autohs
check "Only from these nicks:",1101,5 30 70 8
edit "",1102,10 40 85 10,autohs
check "ChanOffers",1301,5 55 50 10
check "ListImports",1302,5 65 50 10
check "@find replies",1303,5 75 50 10
box "",1401,-10 83 200 200
button "Filter",2989,15 90 30 15,ok
button "Close",2990,55 90 30 15,cancel
}
ON *:DIALOG:_aircpster.filter:init:0:{
_mdx.init $_icofile(aircpster.ico,$scriptdir)
did $iif($_getsetup(mp3,aIRCpster.filter.filematch.state),-c,-u) $dname 1001
did $iif($_getsetup(mp3,aIRCpster.filter.filematch.state),-e,-b) $dname 1002
if ($_getsetup(mp3,aIRCpster.filter.filematch.value) != $null) { did -o $dname 1002 1 $ifmatch }
did $iif($_getsetup(mp3,aIRCpster.filter.reqnicks.state),-c,-u) $dname 1101
did $iif($_getsetup(mp3,aIRCpster.filter.reqnicks.state),-e,-b) $dname 1102
if ($_getsetup(mp3,aIRCpster.filter.reqnicks.value) != $null) { did -o $dname 1102 1 $ifmatch }
did $iif($_getsetup(mp3,aIRCpster.filter.chanoffers),-c,-u) $dname 1301
did $iif($_getsetup(mp3,aIRCpster.filter.listimports),-c,-u) $dname 1302
did $iif($_getsetup(mp3,aIRCpster.filter.@findreplies),-c,-u) $dname 1303
}
ON *:DIALOG:_aircpster.filter:sclick:1001:{ did $iif($did($dname,$did).state,-e,-b) $dname 1002 }
ON *:DIALOG:_aircpster.filter:sclick:1101:{ did $iif($did($dname,$did).state,-e,-b) $dname 1102 }
ON *:DIALOG:_aircpster.filter:sclick:2989:{
var %nick,%ticks = $ticks,%d = $dname,%_fms = $did(%d,1001).state,%_fmv = $did(%d,1002),%_rns = $did(%d,1101).state,%_rnv = $did(%d,1102),%_co = $did(%d,1301).state,%_li = $did(%d,1302).state,%_@f = $did(%d,1303).state
%d = _aircpster
if ($dialog(%d) == $null) { return }
if (%_co == 0) && (%_li == 0) && (%_@f == 0) { halt }
_setsetup mp3 aIRCpster.filter.filematch.state %_fms
_setsetup mp3 aIRCpster.filter.filematch.value %_fmv
_setsetup mp3 aIRCpster.filter.reqnicks.state %_rns
_setsetup mp3 aIRCpster.filter.reqnicks.value %_rnv
_setsetup mp3 aIRCpster.filter.chanoffers %_co
_setsetup mp3 aIRCpster.filter.listimports %_li
_setsetup mp3 aIRCpster.filter.@findreplies %_@f
_aircpster.status Filtering...
var %win = @__aircpsterfilter,%mn,%mf,%i = 1,%j,%match
if (%_rns) { %mn = $replace(%_rnv,$chr(44),$chr(32)) }
if (%mn == $null) || (* isin %mn) { %mn = * }
if (%_fms) { %mf = %_fmv }
if (%mf == $null) { %mf = * }
%mf = $_mp3.parm2wc(%mf)
%j = $numtok(%mn,32)
_openwins %win
while (%i <= %j) {
%nick = $gettok(%mn,%i,32)
if (%_co) && (%_li) && (%_@f) { filter -iw %d 1101 %win - 0 %nick $+ 0 %mf $+ 0 * 0 * 0 * }
else {
if (%_co) { filter -iw %d 1101 %win - 0 %nick $+ 0 %mf $+ 0 * 0 ChanOffer 0 * }
if (%_li) { filter -iw %d 1101 %win - 0 %nick $+ 0 %mf $+ 0 * 0 ListImport 0 * }
if (%_@f) { filter -iw %d 1101 %win - 0 %nick $+ 0 %mf $+ 0 * 0 @find 0 * }
}
inc %i
}
filter -woctue 5 9 %win %d 1201 *
if ($line(%win,0)) { _aircpster.status Found $_nsingoplur($ifmatch,match,matches) $+ ... Click on the "Filter" tab to check $_singoplur($line(%win,0),it.,them.) ( $+ $calc(($ticks - %ticks) / 1000) secs) }
else { _aircpster.status No matches found }
close -@ %win
}
alias -l _aircpster.slots.filter {
var %d = $dname,%nick = $gettok($gettok($did(%d,1301,$did(%d,1301,1).sel),1,9),-1,32),%win = @__aircpsterslotsfilter
_openwins %win
filter -iw %d 1101 %win - 0 %nick $+ 0 * $+ 0 * 0 * 0 *
filter -woctue 5 9 %win %d 1201 *
if ($line(%win,0)) { _aircpster.status Found $_nsingoplur($ifmatch,match,matches) for %nick $+ ... Click on the "Filter" tab to check $_singoplur($line(%win,0),it.,them.) }
else { _aircpster.status No matches found for %nick }
close -@ %win
}
alias -l _aircpster.slots.send {
var %d = $dname,%line = $did(%d,1301,$did(%d,1301,1).sel),%nick = $gettok($gettok(%line,1,9),-1,32),%comchan = $_aircpster.getcommonchan(%nick),%command = $did(%d,1304)
if (%comchan == ERR_DISCONNECTED) { _aircpster.status ERROR: You are not connected! }
elseif (%comchan == ERR_NONICK) { _aircpster.status ERROR: No line selected! }
elseif (%comchan == ERR_YOU) { _aircpster.status ERROR: Can't make requests to yourself! }
elseif (%comchan == ERR_NOCHANS) { _aircpster.status ERROR: No common channels with %nick }
else {
%command = $replace(%command,nick,%nick)
msg %comchan %command
_aircpster.status Sent to %comchan : %command
}
}
alias _aircpster.getcommonchan {
var %nick = $1,%all = $_getsetup(mp3,advertall),%tmp = $_fixchans($_getsetup(mp3,advertchannels))
if ($_not($_connected)) { return ERR_DISCONNECTED }
if (%nick == $null) { return ERR_NONICK }
if (%nick == $me) { return ERR_YOU }
if ($comchan(%nick,0) == 0) { return ERR_NOCHANS }
var %i = $comchan(%nick,0),%chan,%toks
while (%i) {
var %chan = $comchan(%nick,%i),%toks = %toks %chan
if (%all) || ($istok(%tmp,%chan,32)) { return %chan }
dec %i
}
if ($wildtok(%toks,*mp3*,1,32)) { return $ifmatch }
return %chan
}
alias -l _aircpster.request {
var %d = $dname,%line = $did(%d,$did,$did(%d,$did,1).sel),%nick = $gettok($gettok(%line,1,9),-1,32),%file = $gettok($gettok(%line,2,9),2-,32),%comchan = $_aircpster.getcommonchan(%nick)
if (%comchan == ERR_DISCONNECTED) { _aircpster.status ERROR: You are not connected! }
elseif (%comchan == ERR_NONICK) { _aircpster.status ERROR: No line selected! }
elseif (%comchan == ERR_YOU) { _aircpster.status ERROR: Can't make requests to yourself! }
elseif (%comchan == ERR_NOCHANS) { _aircpster.status ERROR: No common channels with %nick }
else {
var %fm = $replace(%file,$chr(32),?),%i = $get(0),%also
while (%i) {
if ($get(%i) != inactive) && (%fm iswm $get(%i).file) {
if ($get(%i) == %nick) {
_aircpster.status ERROR: You are already getting ' $+ %file $+ ' from %nick
return
}
else { %also = %also $get(%i) }
}
dec %i
}
var %exists = $_mp3.exists(%file)
if (%exists != $null) && ($_not($_yesno(1,aIRCpster [/aircpster],1,You already have this file in:<CRLF> [ $nofile(%exists) ] <CRLF>Request anyway?))) { return }
if (%also) && ($_not($_yesno(1,aIRCpster [/aircpster],1,You are already getting that file from: [ %also ] <CRLF>Request also from [ %nick ] ?))) { return }
var %m = ? 0 %nick $+ $chr(9) $+ *,%line,%slots,%ques,%cs,%ts,%cq,%tq,%tmp,%ftmp
if ($didwm(%d,1301,%m,1)) {
var %line = $did(%d,1301,$ifmatch),%slots = $gettok($gettok(%line,2,9),2,32),%ques = $gettok($gettok(%line,3,9),2,32),%cs = $gettok(%slots,1,47),%ts = $gettok(%slots,2,47),%cq = $gettok(%ques,1,47),%tq = $gettok(%ques,2,47)
if (%cs >= %ts) {
if (%cq >= %tq) { %tmp = It seems that %nick has his send slots ( $+ %slots $+ ) and ques ( $+ %ques $+ ) full.<CRLF>Request file anyway? }
else { %tmp = It seems that %nick has his send slots ( $+ %slots $+ ) full.<CRLF>If you request a file, you would be in his que in position $calc(%cq + 1) $+ / $+ %tq $+ <CRLF>Request file ? }
if ($_not($_yesno(1,aIRCpster [/aircpster],1,%tmp))) { return }
}
%ftmp = %nick info: Slots[ $+ %slots $+ ] Ques[ $+ %ques $+ ]
}
else { %ftmp = %nick has no slots/ques info. }
var %command = ! $+ %nick %file
msg %comchan %command
_aircpster.status Sent to %comchan : " $+ %command $+ " - %ftmp
}
}
alias -l _aircpster.transfers.chnick {
var %d = _aircpster
if ($dialog(%d) == $null) { return }
var %m = ? 0 $1 $+ $chr(9) $+ *
while ($didwm(%d,1301,%m,1)) {
var %l = $ifmatch,%tmp = - 0 $2 $+ $chr(9) $+ $gettok($did(%d,1301,%l),2-,9)
did -o %d 1301 %l %tmp
}
}
alias -l _aircpster.import {
var %d = _aircpster,%dir = $getdir(*.txt) $+ *.txt,%file = $$dir="Select a List file:" %dir,%total = 0,%ticks
%ticks = $ticks
if ($dialog(%d) == $null) { return }
if ($lock(run)) {
_aircpster.status ERROR: Can't analize index file, the /run command is locked.
return
}
if ($isfile(%file)) {
var %invalid,%file = " $+ %file $+ ",%i = 1,%n,%line,%tf,%tn
_dummy $read -nw"*!?* *.mp?*" %file
if ($readn) {
var %mircini = $scriptdir $+ importlist.ini,%dde = $ddename $+ importlist,%lfile = $_tmpdir(analizer.aircpster)
if ($isdde(%dde)) {
_aircpster.status ERROR: You are already analizing!
return
}
_aircpster.status Running list analizer...
writeini $"(%mircini) dde ServiceName %dde
remini $"(%mircini) rfiles
writeini $"(%mircini) mirc nick $iif($me,$me,airc)
writeini $"(%mircini) rfiles n0 $_fixfilename(%mircini,m)
writeini $"(%mircini) rfiles n1 $_fixfilename(%mircini,m)
writeini $"(%mircini) rfiles n2 $_fixfilename(%mircini,m)
writeini $"(%mircini) rfiles n3 $_scriptdir(progress.mrc)
writeini $"(%mircini) rfiles n4 $_scriptdir(dlls.mrc)
writeini $"(%mircini) script n3 % $+ file = %file
writeini $"(%mircini) script n4 % $+ maindde = $ddename
writeini $"(%mircini) script n5 % $+ lfile = %lfile
writeini $"(%mircini) script n6 % $+ ticks = %ticks
flushini $"(%mircini)
run $shortfn($mircexe) $shortfn(%mircini)
}
else { _aircpster.status ERROR: Invalid List file: $replace(%file,",') }
}
else { _aircpster.status ERROR: File not found: %file }
}
alias _aircpster.importdone {
var %d = _aircpster,%total = $1,%ticks = $2,%listfile = $gettok($3-,1,$asc(")),%file = $gettok($3-,2,$asc(")),%win = @__aircpsterimportdone
if ($dialog(%d) == $null) { return }
if ($isfile(%file)) && (%total) {
_openwins %win
loadbuf %win " $+ %file $+ "
filter -iwr 2-99999999 %d 1101 %win *
filter -woc %win %d 1101 *
close -@ %win
_aircpster.status Imported $_nsingoplur(%total,line,lines) from ' $+ %listfile $+ ' ( $+ $calc(($ticks - %ticks) / 1000) secs)
}
else { _aircpster.status ERROR: Invalid List file: ' $+ %listfile $+ ' }
}