hmm
wonder if anyone can help me a bit...
i have folder in which are .txt files
they are formated as "yyyy-mm-dd name" (without quotes)
like 2009-07-25 my text.txt
-
now i have dialog with List control and Edit control,
on init of dialog an alias uses findfile to GET list of all
files in that folder and loads them on List control by cutting
the date out and leaving only on List control the Name of file
-
Edit control is just for editing those files...
-
but my problem is, when i try to loadbuf of those files
i cant, because loadbuf is based on did.sel, and since selected
text is cut out (no date), mirc cannot loadbuf the filename
so can $findfile be used to find file simmiliar in names
to find a match (and loadbuf's me) ? :P
the load files:
---------------
"notes" is dialog name
"ID 3 is list control"
alias -l loadnotes {
did -r notes 3
var %tempnotes $qt( $+ $findfile($mircdirnotes,*.txt,did -a notes 3,did -a notes 3 $gettok($deltok($nopath($1-),-1,46),2-,32)))
did -ra notes 6 $findfile($mircdirnotes,*.txt,0) notes
}
here i tried to mix something but i screwed it up :P
List Control click (to loadbuf content)
----------------------------------------
"ID 3 is List control"
"ID 4 is Edit control where content of file goes"
on *:dialog:notes:sclick:*:{
if ($did == 3) {
if ($did($did).sel == 0) { return }
else {
loadbuf -ro $dname 4 $qt($nopath($findfile($mircdirnotes,*.txt,0,$deltok($mircdirnotes\ $+ $did($did).seltext $+ .txt),-1,46),-1,46))
}
}
}
any help would be apreciated