I hope I got the right idea for you here. Try this:
User: {
if ($?="type your text here" != $null) { say $$1 : $! }
}
When you type your message in, it'll send the message along. Also, if you cancel it or close it with NO text in the box, it wont say anything. Also, the $! is whatever you typed into the input box so you dont need to set a variable for it Hope this helps