I have a program that launches an Internet Explorer page as a QProcess and I need to pass two lines of login information plus a password.

I use QProcess process.setWorkingDirectory( "string",args);
process.start( "string");
etc.



I get the handle of the IE window and use the following subroutine to input to IE:

void TWOlogon::sendString( QByteArray string)
{
EnableWindow( hTWO, true);

int length = string.count()+1;
for( int i=0; i<length; i++)
{
keybd_event( string[i], 0,0,0);
keybd_event( string[i], 0, KEYEVENTF_KEYUP, 0);
}
}

This subroutine successfully passes the user login information, but when I try to input the password very strange behaviour takes place. Only two characters show on the password input screen and depending upon the password characters odd things happen to the IE screen such as expanding it to full screen, removing the favorites list, etc.

Any suggestions on what I'm doing wrong?