What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Took me a few hours...

Took me a few hours...
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Took me a few hours...
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...
02-18-2010 04:48 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Took me a few hours... - by Yustme on 02-12-2010 at 07:07 PM
RE: Took me a few hours... - by matty on 02-18-2010 at 04:48 PM
RE: Took me a few hours... - by billyy on 02-18-2010 at 10:08 PM
RE: Took me a few hours... - by Spunky on 02-18-2010 at 10:53 PM
RE: Took me a few hours... - by matty on 02-19-2010 at 03:53 AM
RE: Took me a few hours... - by CookieRevised on 02-19-2010 at 06:07 AM
RE: Took me a few hours... - by Yustme on 02-19-2010 at 11:14 AM
RE: Took me a few hours... - by matty on 02-19-2010 at 12:02 PM
RE: Took me a few hours... - by billyy on 02-19-2010 at 04:54 PM
RE: Took me a few hours... - by matty on 02-19-2010 at 06:52 PM
RE: Took me a few hours... - by billyy on 02-19-2010 at 10:06 PM
RE: Took me a few hours... - by Yustme on 02-21-2010 at 12:28 PM
RE: RE: Took me a few hours... - by whiz on 02-21-2010 at 03:57 PM
RE: Took me a few hours... - by Yustme on 02-21-2010 at 04:01 PM
RE: Took me a few hours... - by whiz on 02-21-2010 at 04:31 PM
RE: Took me a few hours... - by Matti on 02-21-2010 at 10:38 PM
RE: Took me a few hours... - by matty on 02-22-2010 at 03:52 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On