Ah, it writes fine it's the reading where it screws up.
alias -l rxt.h { did -r rxt 501 | var %x = 1 while (%x <= $lines(regexhelp.dat)) { $iif($read(regexhelp.dat,n,%x),did -a rxt 501 $v1) | inc %x } }
n makes it so it doesn't eval anything