I've used SendKeys successfully after opening apps using the shell
function, but a recent attempt is not working. In this case, I'm
opening a database that first asks for a password. I tried using
SendKeys to send my password, but the password is not entered into the
text box of the opening window. The program just stops at that point,
waiting for a password.
I tried using AppActivate, which I never used before, using the title
of the password window but that doesn't work, either. In that case I
used AppActivate "Log In" for the line of code to perform that task -
"Log In" is the title of the window asking for the password. But I
get an error returned that that is not a valid call. I've tried using
the wait boolean choices with both SendKeys and AppActivate, also -
true and false - but nothing seems to work.
How would you write the AppActivate statement to enter the password or
is it possible some apps are protected from automatic password entry
attempts?
Example of code:
SendKeys "MyPassword", False
ReturnValue = Shell("C:\DBFolder\TheDatabase.exe" }
AppActivate ReturnValue
I also tried the following to get past the password screen::
SendKeys "MyPassword", False
AppActivate "log In", false
Thanks,
Don
Juergen Thuemmler - 16 Sep 2004 17:39 GMT
> Is it possible some apps are protected from automatic password entry
> attempts?
It is possible under NT based OS, when the app uses a low level keyboard
hook with the option "skip injected", means it accepts only "real"
(hardware)
keystrokes.
Juergen.