This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

reading from a file.

Old posts that have not been replied to for several years.
Locked
User avatar
iamdeath
Master
Posts: 323
Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:

reading from a file.

Post by iamdeath »

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.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

use [split] by ':' character
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

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...
User avatar
iamdeath
Master
Posts: 323
Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:

Post by iamdeath »

alright.. thanks anyway.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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: Select all

 tag when posting logs, code
Locked