To be honest, I was too tired to read every line in here, but if you just wanna have spaces in your massage or your file...

I use this:

alias spaces {
var %space = 
var %i = $1
while (%i > 0) {
var %space = %space 
dec %i
}
return %fun_space
}

 are two times underline

with this alias:

/msg $nick Hello $+ $spaces(6) $+ there

will have 6 spaces.

As I said, maybe I misunderstood you all, but if not this maybe helped ^_^,
CySlider