You can manually set the carat_position
, so adding something like this to the end of the above script should work:
$bill_box.caret_position = bill_box.length()
That said, I'm not sure it's very user friendly, but it should do what you want...
Note, since you didn't format your code for the forum, it's difficult to tell where you're using "_" chars in the var names as they get "eaten" by the forum as italics markup. So, my use of underscores in the above may or may not be correct. Adjust as necessary.
To prevent that confusion, format your posted code via the "{ }" button in the forum editor's toolbar.