mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
Re: while loops #16821 25/03/03 03:51 AM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Code:
alias pastefile {
  var %z = $lines(blah.txt)
  var %t = 1 
  while ( %t <= %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.

Re: while loops #16822 25/03/03 03:59 AM
Joined: Dec 2002
Posts: 332
C
Cheech Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
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

Re: while loops #16823 25/03/03 04:11 AM
Joined: Dec 2002
Posts: 332
C
Cheech Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
Code:
  
alias pastefile {  
 var %z = $lines(blah.txt)  
 var %t = 1   
 var %x = 0
 while ( %t <= %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

Re: while loops #16824 25/03/03 06:12 AM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
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
Re: while loops #16825 25/03/03 02:48 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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
Re: while loops #16826 26/03/03 01:05 AM
Joined: Dec 2002
Posts: 332
C
Cheech Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
i know i can use /play but i was just working with the loops specifically thx anyhow smile

Page 2 of 2 1 2