Skip to content
MSN

Question.

A TG007 community discussion started by Warrior124.

Discussion 3 posts
Page 1 of 1
Open
Topic #2417 · 3 published posts · 430 views

I'm trying to make my script message results from a search that someone can type in. However, it floods out when it returns the results. Here is the code I have...

 

alias resultz { 
 var %x = 1
 while (%x <= $lines(Results.txt)) { 
   msg $chan $replace($read(Results.txt,%x),--,:,-,:) 
   inc %x
 }
}

 

Is there anyway I can make it slow down so it won't flood itself out?

Edited Jan 4, 2005 1:03 AM by Warrior124

2 ways of doing this.

 

1. use the while loop dll which frees up mIRC a little [ downloadable from here: http://www.mircscripts.org/comments.php?id=2617 ]

 

2. Use Peter's code

 mq {
 inc %mq_pointer
 /hadd -m mq %mq_pointer $1-
 %mq = $addtok(%mq,%mq_pointer,32) 
 if (!$timer(mq)) { .timermq -m 1 $iif(%delay_mq,%delay_mq,400) /mdeq }
} 
mdeq {
 if ($hget(mq,0).item == 0) { unset %mq }
 else {
   var %item = $gettok(%mq,1,32)
   %mq = $deltok(%mq,1,32)
   /msg $hget(mq,%item)
   hdel mq %item
   if (%mq) { .timermq -m 1 $iif(%delay_mq,%delay_mq,400) /mdeq }
   else { unset %mq_pointer }
 }
}

 

same format as /msg $chan <message> but instead replace /msg with /mq [if it doesn't work remove $chan]

Thanks, Gate Keeper. I tried the WhileFix.dll, but it didn't work, lol. However, the code you gave works perfectly. Thanks for your help.