What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » need help writing a script

need help writing a script
Author: Message:
ganate123
New Member
*


Posts: 7
34 / Male / –
Joined: Sep 2006
O.P. need help writing a script
i cant figure this one out...
i want to make it so when <email adress> signs in it opens a chat window for <contacts email> but i tryed everything and i couldnt get it... also im new so any help is appreaciated
09-13-2006 07:40 PM
Profile E-Mail PM Find Quote Report
Jesus
Scripting Contest Winner
****

Avatar
Koffie, my cat ;)

Posts: 623
Reputation: 15
37 / Male / Flag
Joined: Jul 2005
RE: need help writing a script
code:
function OnEvent_ContactSignin(Email)
{
Messenger.OpenChat(Email)
}

haven't tested, but should work

This post was edited on 09-13-2006 at 08:06 PM by Jesus.
09-13-2006 07:46 PM
Profile PM Find Quote Report
Shondoit
Full Member
***

Avatar
Hmm, Just Me...

Posts: 227
Reputation: 15
35 / Male / Flag
Joined: Jul 2006
RE: need help writing a script
No, you need the Contact, not the email, so it should be:
According to the scripting doc, an email works too
code:
function OnEvent_ContactSignin (Email) {
   var Contact = Messenger.MyContacts.GetContact(Email)
   Messenger.OpenChat(Contact)
}
(edit: put it in code tags)

This post was edited on 09-13-2006 at 08:02 PM by Shondoit.
My scripts:                            [Image: shondoit.gif]
+ Timezone
+ Camelo
+ Multisearch
09-13-2006 07:59 PM
Profile PM Find Quote Report
Jesus
Scripting Contest Winner
****

Avatar
Koffie, my cat ;)

Posts: 623
Reputation: 15
37 / Male / Flag
Joined: Jul 2005
RE: need help writing a script
yeah at first I thought that I needed the contact too, but the scripting doc proved us wrong :)
09-13-2006 08:05 PM
Profile PM Find Quote Report
ganate123
New Member
*


Posts: 7
34 / Male / –
Joined: Sep 2006
O.P. RE: need help writing a script
ok thanks for the help but i think im doin somethin wrong
this is what i have so far

function OnEvent_ContactSignin ('example@hotmail.com') {
   var Contact = Messenger.MyContacts.GetContact('example@hotmail.com')
   Messenger.OpenChat(Contact)
}

whats wrong?
09-13-2006 10:10 PM
Profile E-Mail PM Find Quote Report
Shondoit
Full Member
***

Avatar
Hmm, Just Me...

Posts: 227
Reputation: 15
35 / Male / Flag
Joined: Jul 2006
RE: need help writing a script
You should not replace the 'Email' parameter

When the function 'OnEvent_ContactSignin' is called as an event, it passes one parameter named Email, so you know who signed in...
If you want to do this for only one person, you should check if the Email parameter is the same as the email of the person you want

function OnEvent_ContactSignin (Email) {
   if (Email == "example@hotmail.com") {
      var Contact = Messenger.MyContacts.GetContact(Email)
      Messenger.OpenChat(Contact)
   }
}
My scripts:                            [Image: shondoit.gif]
+ Timezone
+ Camelo
+ Multisearch
09-13-2006 10:20 PM
Profile PM Find Quote Report
ganate123
New Member
*


Posts: 7
34 / Male / –
Joined: Sep 2006
O.P. RE: need help writing a script
ok that works and now i understand it but i just read what i wanted for a script and it was a lil confuzing.  what i meant was when my email signs in i want it to automatically open a convo window of one of my friends.  like i sign in and if their online or offline it brings up the window.

but thanks for the first script. i love it but i would still like the one i just described agian
09-13-2006 10:36 PM
Profile E-Mail PM Find Quote Report
Shondoit
Full Member
***

Avatar
Hmm, Just Me...

Posts: 227
Reputation: 15
35 / Male / Flag
Joined: Jul 2006
RE: need help writing a script
function OnEvent_Signin (Email) {
   var Contact = Messenger.MyContacts.GetContact("example@hotmail.com")
   Messenger.OpenChat(Contact)
}

Perhaps you should have a look in the scripting documentation
My scripts:                            [Image: shondoit.gif]
+ Timezone
+ Camelo
+ Multisearch
09-13-2006 10:42 PM
Profile PM Find Quote Report
ganate123
New Member
*


Posts: 7
34 / Male / –
Joined: Sep 2006
O.P. RE: need help writing a script
i did.  i learn better by example but yea the script you gave me opens any contact that comes online :S umm heres the script in entirety



function OnEvent_ContactSignin (Email) {
    if (Email == "HerEmail@hotmail."); {
    var Contact = Messenger.MyContacts.GetContact(Email);
     Messenger.OpenChat(Contact);
    }
}

function OnEvent_Signin (Email) {
    var Contact = Messenger.MyContacts.GetContact("HerEmail@hotmail.com")
    Messenger.OpenChat(Contact)
}


ok so it opens any contact that comes online and i only want this script to function on my email death.to.emo@hotmail.com

thanks for all your help
09-13-2006 11:58 PM
Profile E-Mail PM Find Quote Report
cloudhunter
Senior Member
****


Posts: 536
Reputation: 18
36 / – / –
Joined: Dec 2005
RE: need help writing a script
Forget the top bit of the script... Just use this.

code:
function OnEvent_Signin (Email) {
var Contact = Messenger.MyContacts.GetContact("HerEmail@hotmail.com");
Messenger.OpenChat(Contact);
}

Remember to put ; at the end of every line, to terminate the line.

Cloudy
[Image: cloudy.jpg]
Sig by pirateok/marisaok/marisa ;)
quote:
Originally posted by Moulin Rouge
The greatest thing you'll ever learn, is just to love and be loved in return

6702 days, 4 hours, 25 minutes, 44 seconds ago
09-14-2006 12:30 AM
Profile E-Mail PM Find Quote Report
« 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