egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

reading from a file.

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Fri Sep 16, 2005 3:30 pm    Post subject: reading from a file. Reply with quote

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
View user's profile Send private message Visit poster's website
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Fri Sep 16, 2005 5:00 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Sat Sep 17, 2005 5:05 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Sun Sep 18, 2005 9:33 pm    Post subject: Reply with quote

alright.. thanks anyway.
Back to top
View user's profile Send private message Visit poster's website
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sun Sep 18, 2005 9:48 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber