I have been doing a lot of work on a new style of polygamy launcher. Problem I am experiencing is that the password field isn't editable using Active Accessibility. If the user has saved their password you can use the code I was playing with. I am going to tell you now this is very advanced and probably not going to make any sense to you.
js code:
if (Messenger.MyStatus === STATUS_UNKNOWN) {
Debug.DebuggingWindowVisible = true;
Debug.ClearDebuggingWindow();
var hWnd = Interop.Call('user32', 'FindWindowExW', Messenger.ContactListWndHandle, 0, 'Main Window Class', '');
hWnd = Interop.Call('user32', 'FindWindowExW', hWnd, 0, 'DirectUIHWND', '');
var IID_IAccessible = Interop.Allocate(16);
Interop.Call('ole32', 'IIDFromString', '{618736E0-3C3D-11CF-810C-00AA00389B71}', IID_IAccessible);
var pAccessibleData = Interop.Allocate(4);
if(Interop.Call('oleacc', 'AccessibleObjectFromWindow', hWnd, 0xFFFFFFFC, IID_IAccessible, pAccessibleData) === 0) {
var iAccessible = pAccessibleData.ReadInterfacePtr(0);
if(iAccessible) {
var iAccessibleChildren = Interop.Allocate(16*iAccessible.accChildCount);
var iAccessibleChildrenFound = Interop.Allocate(4);
if (Interop.Call('oleacc', 'AccessibleChildren', iAccessible, 0, iAccessible.accChildCount, iAccessibleChildren, iAccessibleChildrenFound) === 0){
for (var i=0; i<iAccessibleChildrenFound.ReadDWORD(0); ++i) {
if (iAccessibleChildren.ReadDWORD(i*16) === 0x9) {
var iAccessibleChild = iAccessibleChildren.ReadInterfacePtr(i*16+8);
if (iAccessibleChild) {
try{
if (iAccessibleChild.accName(0).match ( /E-mail+/)) {
iAccessibleChild.accValue(0) = ''; // email goes here
}
if (iAccessibleChild.accName(0).match ( /Sign+/)) { // I dont remember what the login button is labeled.
iAccessibleChild.accDoDefaultAction(0); // this should sign the user in
}
}catch(e){
//Most likely the password edit box as you cannot access it using Active Accessibility...
}
}
}
}
}
}
}
}
Good luck... you are going to need it after looking at this...