Yes im using kixforms where $TextBox.Text is representing
"domain\user"

I try your script, but it gives me error:

ERROR : unknown command [Writelog]!
Line : 33

_________________________
"... Great minds talk about idea' s, average minds talk about events and samll minds talks about people...!"