from cscript

function write_text(my_text)
{
diag(my_text);
}

write_text("asd");

read the manual and/or scripting tutorials