If I got a variable that contains a random amount of words seperated with space and I want to make a whileloop that write every word from it line by line in a list in a dialog, whats the code for the loop?
var %cnt = 1
var %total = $gettok(%variable,0,32)
while (%cnt <= %total) {
did -a DNAME ID $gettok(%variable,%cnt,32)
inc %cnt
}
Replace the DNAME ID part and it should be fine. If you want to insert the lines somehow other than just adding them, try -i instead (or check for other methods of using /did).