Thanks Charles,
This pretty much nullifies my entire message so I'm deleting it. But then I must admit I don't understand either why, according to Aurel, his proxy
string script
script = tx
SendMessage hsci,SCI_SETTEXT,0, strptr script
works while his direct
SendMessage hsci,SCI_SETTEXT,0, strptr tx
doesn't.