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.

Issue with timers

Help for those learning Tcl or writing their own scripts.
Post Reply
M
MrStatic
Voice
Posts: 3
Joined: Tue Apr 29, 2008 3:56 am

Issue with timers

Post by MrStatic »

So I am looping through a txt file and running this command

Code: Select all

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
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

it should be something like this ..

Code: Select all

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
Post Reply