mIRC Homepage
Posted By: jacksparrow2 loop again - 21/08/04 04:12 PM
alias releer {
while (%tx) {
var %tx =1
set %privados $read(texto.ini,%tx)
.echo -s 7Privados %privados
dec %tx
}
how i do it ?
Posted By: TonyTheTiger Re: loop again - 21/08/04 04:34 PM
alias releer {
var %tx = 1,%l = $lines(texto.ini) + 1
while (%tx < %l) {
echo -s 7Privados $read(texto.ini,n,%tx)
inc %tx
}
}
Posted By: TroyBoy Re: loop again - 23/08/04 06:18 AM
Reading from bottom to top:

alias releer {
var %tx = $lines(texto.ini)
while (%tx > 0) {
echo -s 7Privados $read(texto.ini,%tx)
dec %tx
}
}

reading from top to bottom:

alias releer {
var %tx = 1
while (%tx <= $lines(texto.ini)) {
echo -s 7Privados $read(texto.ini,%tx)
inc %tx
}
}
Posted By: Coolkill Re: loop again - 23/08/04 09:07 AM
If all your doing is outputting the contents of a file into the status window, you might as well just use /play.

Add the alias to your remotes, this editing 'Private' to make it look how you like.

alias pfile { echo -s Private; $3- }

And the following is the command to output the file to the status window.

/play -sa /pfile test.txt

This allows you to add a number to the edit specifying how fast you want it to play, by default its set to 1000ms.

Eamonn.
Posted By: FiberOPtics Re: loop again - 23/08/04 03:37 PM
Or you could simply use /filter with the s flag, which will use the Status Window as output, with the advantage over /play, that the contents of the file will be there immediately.

Usage: /showtexto

alias showtexto filter -fs texto.ini *

Greets
© mIRC Discussion Forums