Ruby, 7171 50 bytes
a=0;$*[0]$*[0].scansplit(/./?#).each{|c|a+=1if ?;==c;if ?#==c;print |p|$><<(a%127p.count(?;)%127).chr;a=0;endchr}
Not much to say about thisEdit: Complete rewrite. $* == ARGV
, so $*[0]
manatwork's solution is the first (and only) command line argument. Otherwisestill shorter, it's just an exercise in how many spaces can be trimmed. I'mbut this does it a slightly annoyed it's not shorter.different way!