PDA

View Full Version : need help for tcl programming


Big
08-27-2004, 10:10 AM
hello

I want to script a racers ranking (with points)
so on the end of the race i've to go in .ioftpd.message to get the name of the racers and to give them "points" (and then update the ranking, but thats for later)

i never script in tcl (but i've notions in C so i think there is no problem)

here is my question : how can i get the name of all the racers ?
i've thunk about a "seek" cmd but i'm not sure about how to use it...


help is welcome :p

thx a lot

Mouton
08-27-2004, 02:56 PM
tcl has a regexp procedure... probably best for something like that. see tcl manual for usage.

open text file
for each line
check for a specific regexp
if found
you got your racer name in a var now
.
.
close file

Big
08-31-2004, 07:51 AM
ok thx, i'm going to search how to use that :-)