The only comment I'd make would be to change the parameter order:

$editbox(window,N,E)

Where E (the editbox number) is optional, and defaults to 0.


Sais