//var %file = "C:\temp\hi.txt", %i = 1 | while (%i <= $lines(%file)) { tokenize 32 $read(%file, %i) | while ($1 != $null) { echo - $1 | tokenize $2- } | inc %i }
You've missed a 32 in the /tokenize command..This should not works even with multiple lines, but this may be due to the fact that /tokenize doesn't report any error...
In other words, how can I get this to work:
alias echowords {
var %i = 1
while (%i <= $0) {
echo Word %i is: $%i
inc %i
}
}
you can use $($+($,%i),2)
or you can store $1- in a %variable and then use $gettok(%variable,%i,32)