Firstly, you are true that MDX uses the first line as a header, so what you need to do is add 1 to the select count, not 2, as you were thinking of doing. Furthermore, when doing a command like $input, you don't need to set variables or have an "else" statement... it can be simply done as...
alias -l rem.chan {
;;;tokenize ($did($dname,2).text,32)
if ($input(Are you sure you want to delete the channel $+ %select.chan from your favourites list?,qcyd,Confirm)) {
splay clear.wav
write -dl $+ $readn $calc($did($dname,2).sel + 1) $read(Engine/Text/favourites.txt)
}
chan.list
}