generic popup handler
I have a desktop application that has many programs which can be run from a launchpad. Some of these programs will require confirmation to switch to a different user (for security purposes) and some will not.
I can record an operation to be fired from an OnUnexpectedWindow event, but the recording is tied to the name of the module.
Here is a sample script:
procedure Login;
var settingsNavigator : OleVariant;
var tdlgUserLogIn : OleVariant;
begin
settingsNavigator := Aliases.SettingsNavigator;
settingsNavigator.TMessageForm2.Yes.Keys('[Enter]');
tdlgUserLogIn := settingsNavigator.dlgUserLogIn;
tdlgUserLogIn.edtUserName.Keys('login[Enter]');
tdlgUserLogIn.edtPassword.Keys('[Enter]');
tdlgUserLogIn.Panel1.btnOK.Keys('[Enter]');
end;
This login was launched with the SettingsNavigator program. The script then ties everything that happens after that to that program.
I don't want to have to make N of these to only handle the N programs that need a login. I need a generic way to handle the login prompt, regardless of what program opens it.
Thanks,