alias releer {
while (%tx) {
var %tx =1
set %privados $read(texto.ini,%tx)
.echo -s 7Privados %privados
dec %tx
}
how i do it ?
alias releer {
var %tx = 1,%l = $lines(texto.ini) + 1
while (%tx < %l) {
echo -s 7Privados $read(texto.ini,n,%tx)
inc %tx
}
}
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
}
}
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.
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