You could use Auto-IT to wait for the window to appear then populate it.

If the dialogue is a standard HTTP challenge window then you may be able to make use of the "remember my login / password" option if the browser supports it.

If the proxy supports pass-through authentication you may be able to enable it in the web browser in which case the window should only appear if there is an authentication or authorisation issue.