mIRC Homepage
Posted By: pheonix using write to log a multi line edit box - 11/05/03 12:14 AM
dialog Logs {
title "Logging"
size -1 -1 160 127
option dbu
edit "", 1, -2 0 163 46, multi return hsbar vsbar
button "Write ", 2, 8 64 37 8
combo 3, 100 45 60 30, size drop
edit "", 4, 0 45 100 11, autohs
edit "", 5, -1 75 162 53, multi return hsbar vsbar
button "Read ", 6, 55 64 37 8
}
on *:Dialog:logs:Sclick:2:{
/write $did(4) $did(1)
}
on *:Dialog:logs:sclick:6:{
$read($did(4),s,*)
}
on *:Dialog:logs:init:0:{
$findfile($mircdir,*.txt,0,did -a logs 3 $nopath($1-))
}
on *:Dialog:logs:sclick:3:{
did -ra logs 4 $did(3).seltext
/run $mircdir $+ $did(4)
}

the problem area is this:
on *:Dialog:logs:Sclick:2:{
/write $did(4) $did(1)
}

it only logs the 1st line of the edit box frown

any ideas would be greatly appreciated smile
You have to write a loop that adds in every line into the editbox.
Posted By: ScatMan Re: using write to log a multi line edit box - 11/05/03 12:33 AM
u can use a while loop:
on *:Dialog:logs:Sclick:2:{
var %i = 1
while (%i <= $did(1).lines) {
write $did(4) $did(1,%i)
inc %i
}
}
also u can use /filter:
on *:Dialog:logs:Sclick:2:{
filter -if $dname 1 $did(4)
}
i'm suggest u to use /filter becuz it's faster

Posted By: pheonix Re: using write to log a multi line edit box - 11/05/03 12:34 AM
thanks smile
Posted By: pheonix Re: using write to log a multi line edit box - 11/05/03 12:36 AM
works grin
© mIRC Discussion Forums