What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Newest Version of my script doesnt start up

Newest Version of my script doesnt start up
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Newest Version of my script doesnt start up
Use this instead

Javascript code:
function OnEvent_Initialize(MessengerStart) {
    if (Messenger.MyStatus < STATUS_INVISIBLE) return false;
    StartDetach();
}
 
function OnEvent_SigninReady(sEmail) {
    OnEvent_Initialize(true);
}


The reason this is happening is because of the following:

When the script is started and no one is logged in the Messenger object isn't populated completely. By that I mean Messenger.MyEmail doesn't exist etc. When your script calls StartDetatch() you are trying to read the registry but because Messenger.MyEmail doesn't exist yet it fails. By checking if the user is logged in you can prevent this from happening. By adding the function OnEvent_SigninReady this is called when the entire login process is completed and the contact list is fully gathered from the servers.

This post was edited on 05-19-2009 at 12:57 PM by matty.
05-19-2009 12:53 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Newest Version of my script doesnt start up - by xXDarknessXx on 05-17-2009 at 07:14 AM
RE: Newest Version of my script doesnt start up - by matty on 05-19-2009 at 12:53 PM
RE: Newest Version of my script doesnt start up - by xXDarknessXx on 05-19-2009 at 02:35 PM
RE: RE: Newest Version of my script doesnt start up - by sno on 05-29-2009 at 10:38 PM
RE: Newest Version of my script doesnt start up - by matty on 05-19-2009 at 04:32 PM


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