| |||
I need help with tcl Posted by FireFox (FireFox), 27 August 2003 I have a file that has multiple data for a subject and i need to get all instances of the data. But my statement only gives me one instance. etx. note1, note2 and so on. set desc [getuser $user XTRA note] I think I should be using lindex , but not sure how to use it. Posted by admin (Graham Ellis), 27 August 2003 Hi, Welcome ....getuser is a new command on me - and I can't find it in my Tcl nor my expect - perhaps it's a proc that's defined somewhere else in your program? If you can tell me a bit more about it, I might be able to help .... Posted by FireFox (FireFox), 27 August 2003 Hi, its in the doc folder ,tcl-commands.doc that is installed with eggdropgetuser <handle> <entry-type> [extra info] | this is a generic interface to the new generic userfile support, it Posted by admin (Graham Ellis), 28 August 2003 OK - you've given me a clue there. Tcl is a language that's often embedded in applications to provide tailoring, and you're using it within the eggdrop Open Source IRC bot. I don't have this piece of software installed on my machine, and it seems from the brief description that you posted that it's quite a high level routine (I guess this from the name of the parameters). Tricky to help unless I download, install, learn more about eggdrop and (sorry) I don't have the time ....BUT ... are you telling me that the desc variable ends up with a space separated list of words that you want to process one by one?? If that's the case, I can write you a couple of paragraphs on writing an appropriate loop, as getuser would be a side issue. Posted by FireFox (FireFox), 28 August 2003 What I'm trying to do is capture all the note info that assigned to a user. this just gives me the first note set desc [getuser $user XTRA note] the file is structured like this user XTRA note1 XTRA note2 XTRA note3 and so on Posted by admin (Graham Ellis), 29 August 2003 Sadly (because I don't know getuser), I think that the answer lies in how getuser is called - perhaps you need to call it twice, perhaps you need to modify the XTRA to some other name or have note being something other than plain text. If you would like me have a deeper look I've not got the time to install eggdrop and learn it, but I could go through the getuser manual page - please do NOT post it here unless the copyright terms on eggdrop allow it, but do email me a copy of the approapriate page. My email is graham@wellho.netThis page is a thread posted to the opentalk forum
at www.opentalk.org.uk and
archived here for reference. To jump to the archive index please
follow this link.
| |||
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho |