A Text Field Is Not Allowing Input

This functionality is supported only if you are using the Classic Agent.

Problem

A text field does not accept input from TypeKeys and SetText or allow a paste from the Clipboard.

For example, in the following script, the Password text field does not get any text set in it:
EnterNetworkPassword.SetActive ()
EnterNetworkPassword.Password.SetText ("mypassword")
EnterNetworkPassword.OK.Click ()

Solution

Make a DLL call to SendMessage, which is declared in msw32.inc, in the following way:

use "msw32.inc"
...
Clipboard.SetText ({"mypassword"})
EnterNetworkPassword.Password.DoubleClick ()
SendMessage (EnterNetworkPassword.Password.hWnd,WM_PASTE, 0,0)

By using the API message WM_PASTE in a SendMessage call, the text field will get populated with the text that is on the Clipboard.