help with topic recovery script - 01/09/05 05:08 AM
hello again,
i'm currently working on a small topic recover type thingy, and i'm stumped with how to handle the store file. it's a dialog based syetem, and i have been fortunate enough to come up with some good examples. however, i'm stumped on how to get the results i want..
here are the samples i have:
(these would be used in the dialog init event)
and
now what i'm doing is loading the files contents into a dialog, for review and what-not. the first piece of code i posted does what i want.. which is return the line of text in split format to the appropriate boxes.. but i'm unsure on how to delete lines from the file using the first code.
the second piece of code displays the whole line instead of what i'm looking for, which is everything after the pipe(chr(124))
heres the dialog code :
i do hope i'm making some kind of sense here.. any ways could someone help with this?
thanks in advance
i'm currently working on a small topic recover type thingy, and i'm stumped with how to handle the store file. it's a dialog based syetem, and i have been fortunate enough to come up with some good examples. however, i'm stumped on how to get the results i want..
here are the samples i have:
(these would be used in the dialog init event)
Code:
.fopen cc OPCTrecovery.dat if !$ferr { while !$feof { if $fread(cc) { tokenize 124 $v1 did -a $dname 5 $1 did -a $dname 1 $2 } } } .fclose cc }
and
Code:
loadbuf -o $dname 1 OPCTrecovery.dat var %i = 1 while $did(1,%i) { did -a $dname 5 $gettok($v1,1,124) inc %i }
now what i'm doing is loading the files contents into a dialog, for review and what-not. the first piece of code i posted does what i want.. which is return the line of text in split format to the appropriate boxes.. but i'm unsure on how to delete lines from the file using the first code.
the second piece of code displays the whole line instead of what i'm looking for, which is everything after the pipe(chr(124))
heres the dialog code :
Code:
dialog opc_tr { title Topic Recovery For: size -1 -1 261 70 option dbu combo 1, 7 20 246 50, hsbar drop button "Close", 2, 207 52 37 12, ok button "Delete Topic", 3, 7 51 37 12 button "Restore Topic", 4, 59 51 37 12 list 5, 60 6 50 10, size text "Last Edited On:", 6, 19 8 39 7 } On *:TOPIC:*:{ /write OPCTR.dat $+($asctime(mmmddyy@hh:nntt),$chr(124),$chan(#).topic) } raw 332:*:{ /write OPCTR.dat $+($asctime(mmmddyy@hh:nntt),$chr(124),$3-) }
i do hope i'm making some kind of sense here.. any ways could someone help with this?
thanks in advance