mIRC Home    About    Download    Register    News    Help

Page 2 of 2 < 1 2
Topic Options
#16821 - 25/03/03 03:51 AM Re: while loops
Collective Offline
Planetary brain

Registered: 10/12/02
Posts: 3138
Loc: London, UK
Code:
alias pastefile {
  var %z = $lines(blah.txt)
  var %t = 1 
  while ( %t &lt;= %z ) {
    .timer 1 $calc(%t - 1) msg $active $read(blah.txt,%t)
    inc %t
  }
}


There isn't a command built into mIRC to pause a loop, but the /sleep snippet might do the job..never used it to do that myself.

Top
#16822 - 25/03/03 03:59 AM Re: while loops
Cheech Offline
Fjord artisan

Registered: 12/12/02
Posts: 332
Loc: Louisiana, USA
ok thx everyone for the input perhaps as a future suggestion the could add a /resume or something then you could just /break /resume to slow it down .. lol thx again i will check out the /sleep snippet smile

Top
#16823 - 25/03/03 04:11 AM Re: while loops
Cheech Offline
Fjord artisan

Registered: 12/12/02
Posts: 332
Loc: Louisiana, USA
Code:
  
alias pastefile {  
 var %z = $lines(blah.txt)  
 var %t = 1   
 var %x = 0
 while ( %t &lt;= %z ) {    
 .timer 1 $calc(%t + 3) msg $active $read(blah.txt,%t)   
 inc %t 
 inc %x 3
 }
}


thx again that last one worked i just changed it slightly to get a 3 sec delay smile

Top
#16824 - 25/03/03 06:12 AM Re: while loops
_D3m0n_ Offline
Hoopy frood

Registered: 11/12/02
Posts: 1527
Loc: Florida,USA
i had tried to use that sleep snippet to pause my loop at one point and i could seem to figure it out how to make it work inside of that ..... unfortunatly the best i could come up with to do was to make the loop have a timer delay on its command ..... altho im sure there is someone out there who can come up with the correct usage of how to do that ..... im just not that good yet with scripting ......
_________________________
D3m0nnet.com

Top
#16825 - 25/03/03 02:48 PM Re: while loops
qwerty Offline
Hoopy frood

Registered: 07/01/03
Posts: 2523
What you want can be done with a single command:
/.play $active blah.txt 3000
_________________________
/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com

Top
#16826 - 26/03/03 01:05 AM Re: while loops
Cheech Offline
Fjord artisan

Registered: 12/12/02
Posts: 332
Loc: Louisiana, USA
i know i can use /play but i was just working with the loops specifically thx anyhow smile

Top
Page 2 of 2 < 1 2