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 

Issue with timers

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
MrStatic
Voice


Joined: 29 Apr 2008
Posts: 3

PostPosted: Wed Apr 30, 2008 3:53 am    Post subject: Issue with timers Reply with quote

So I am looping through a txt file and running this command
Code:
utimer 30 [ list putserv "PRIVMSG $chan :$line" ]

But that delays the entire output by 30 seconds so itll wait 30 seconds then display the lines without delay, I am attempting to delay each line output
Back to top
View user's profile Send private message
Ofloo
Owner


Joined: 13 May 2003
Posts: 953
Location: Belguim

PostPosted: Wed Apr 30, 2008 7:01 am    Post subject: Reply with quote

it should be something like this ..

Code:
if {![catch {open "myfile.txt" r} r]} {
  set time 0
  while {![eof $r]} {
    gets $r line
    utimer [incr time 30] [list putserv "PRIVMSG $chan :$line"]
  }
  close $r
}

_________________
XplaiN but think of me as stupid
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help 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