| View previous topic :: View next topic |
| Author |
Message |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Fri Sep 16, 2005 3:30 pm Post subject: reading from a file. |
|
|
Hi, actually I am trying to write one tcl, which will read data from a File. The data is written in a format of:
Something:1:1: Text is here...
Something:1:2: Text is here...
Something:1:3: Text is here..
Something:32:21: Text is here..
etc etc..
So when a User goes in a Channel..
!something 1 1
bot read it from the file and paste in the channel.
I`m a bit confused how will I mention these ":" in TCl, is there any best example or any tcl out there with which I learn and continue making my script..
Help will be appreciated. |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Fri Sep 16, 2005 5:00 pm Post subject: |
|
|
use [split] by ':' character _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Sat Sep 17, 2005 5:05 am Post subject: |
|
|
I recommed reading the file line per line and append it to a list after splitting.
that way you have table with each entry as collum and each line as row. Now you only need to read the FAQ/manual to further access the table. _________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
| Back to top |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Sun Sep 18, 2005 9:33 pm Post subject: |
|
|
| alright.. thanks anyway. |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sun Sep 18, 2005 9:48 pm Post subject: |
|
|
anyway? if you expected more than that, just say so, do not hesitate to ask for help with specific issues you might be having _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
|