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

Pages: (2): « First [ 1 ] 2 » Last »
Took me a few hours...
Author: Message:
Yustme
Junior Member
**


Posts: 85
41 / – / –
Joined: Aug 2005
O.P. Took me a few hours...

Hi,

But i finally found out how to start an WLM window.

How can I fill in the email address and make it log in?
02-12-2010 07:07 PM
Profile PM Find Quote Report
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
billyy
Full Member
***

Avatar

Posts: 103
Reputation: 1
37 / Male / Flag
Joined: Feb 2010
Status: Away
RE: Took me a few hours...
i could have gone my whole life not knowing what === means O_O
I'm new at this, so don't expect me to be usefull any
time soon. But if i behaved you could rep me :P
02-18-2010 10:08 PM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: Took me a few hours...
It's a strict comparison (value and type)

<Eljay> "Problems encountered: shit blew up" :zippy:
02-18-2010 10:53 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Took me a few hours...
In other words a bitwise comparison...

Normal comparisons if (1 == '1') is true because it is comparing the value. Bitwise comparison is checking, as Spunky said the value and type therefore 1 === '1' is false.

This post was edited on 02-19-2010 at 03:54 AM by matty.
02-19-2010 03:53 AM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Took me a few hours...
quote:
Originally posted by matty
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.
Which, I think, isn't so much of a problem because it makes only sense that the user has saved passwords if he also wants to auto-launch several sessions. Otherwise, it isn't "automatic" because you would always need user input....

----------------

[OFF TOPIC]
Billyy, more detailed info about the difference between an equality (==, !=) and a identity (===, !==) operator can be found here:
CookieRevised's reply to Nudges, Updated.

Or in the Windows scripting documentation

[/OFF TOPIC]

This post was edited on 02-19-2010 at 06:11 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
02-19-2010 06:07 AM
Profile PM Find Quote Report
Yustme
Junior Member
**


Posts: 85
41 / – / –
Joined: Aug 2005
O.P. RE: Took me a few hours...


Matty,

What does that function do?

This is not the new _Registry.js file right?
02-19-2010 11:14 AM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Took me a few hours...
quote:
Originally posted by Yustme
Matty,

What does that function do?

This is not the new _Registry.js file right?
No it has nothing to do with the registry... Like I said it is likely above you. It sets the email address on the login screen.

quote:
Originally posted by CookieRevised
Which, I think, isn't so much of a problem because it makes only sense that the user has saved passwords if he also wants to auto-launch several sessions. Otherwise, it isn't "automatic" because you would always need user input....

What I was trying to accomplish was have an encrypted password stored in the registry, not in WLM and pass the email, encrypted password and status as command line parameters and log the user in that way. It was going to be a new way of doing polygamy.

This post was edited on 02-19-2010 at 12:04 PM by matty.
02-19-2010 12:02 PM
Profile E-Mail PM Find Quote Report
billyy
Full Member
***

Avatar

Posts: 103
Reputation: 1
37 / Male / Flag
Joined: Feb 2010
Status: Away
RE: Took me a few hours...
Oh yeah no i understood it after reading it... im a nublet but i learn fast.. there should be a page with all functions tough, that helped me a load with php, c, vb and easyest of all lsl (lsl = Linden Scripting Language. It's a realy easy kind of scripting language a lot like C used to make objects in the virtual world of SecondLife do stuffz..)
But i wish i could just memorise all commands...

But that was totaly off topic *-)

edit:
Okay... i master html and batch (lolz)

Again totally off-topic :^)

This post was edited on 02-19-2010 at 05:00 PM by billyy.
I'm new at this, so don't expect me to be usefull any
time soon. But if i behaved you could rep me :P
02-19-2010 04:54 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Took me a few hours...
Download the scripting documentation... this will have all of the natively supported functions and properties.

Download the JScript documentation from Micrososoft... this will have all the native functions supported by JScript...

What you see above... none of that in any way is supported by JScript nateively. It is made possible by Messenger Plus! and the scripting engine.

So to have a list of functions supported isn't possible... Microsoft documents almost all of their APIs on MSDN

This post was edited on 02-19-2010 at 06:56 PM by matty.
02-19-2010 06:52 PM
Profile E-Mail PM Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« Next Oldest Return to Top Next Newest »


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