mIRC Home    About    Download    Register    News    Help

Print Thread
using write to log a multi line edit box #23603 11/05/03 12:14 AM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
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


new username: tidy_trax
Re: using write to log a multi line edit box #23604 11/05/03 12:33 AM
Joined: Dec 2002
Posts: 196
T
trenzterra Offline
Vogon poet
Offline
Vogon poet
T
Joined: Dec 2002
Posts: 196
You have to write a loop that adds in every line into the editbox.


trenzterra
AustNet #trenzterra and #w
Head Scripter @ http://trenzterra.uni.cc
Re: using write to log a multi line edit box #23605 11/05/03 12:33 AM
Joined: May 2003
Posts: 730
S
ScatMan Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
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


Re: using write to log a multi line edit box #23606 11/05/03 12:34 AM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
thanks smile


new username: tidy_trax
Re: using write to log a multi line edit box #23607 11/05/03 12:36 AM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
works grin


new username: tidy_trax