What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Can any nice person help me with the basic?(still need help)

Can any nice person help me with the basic?(still need help)
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: Can any nice person help me with the basic?(still need help)
Well, first of all you'll need to learn the basics of JScript. Microsoft JScript looks a bit like JavaScript, so if you find a tutorial about JavaScript (like on w3schools.com) you can learn the basics from there if you want, like syntax, variables, functions, loops, statements,... You don't need to learn about the functions which require the script to be ran in a HTML page, because Plus! doesn't work with HTML. :P

If you understood the basics, you'll need to investigate the Scripting Documentation. I can assure you, for every script developer, the documentation is his most holy thing. It contains information about the available objects, functions, properties and events and has XML schemes with information about what you can use in a Plus! interface file. Most people get lost in the syntax part of a function. An example of a  syntax information:
code:
MsgPlus::DisplayToast
[boolean] DisplayToast(
    [string] Title,
    [string] Message,
    [string,optional] SoundFile,
    [string,optional] Callback,
    [var,optional] CallbackParam
);
The first line indicates the name of the function (DisplayToast) and the type of the return value, in this case it'll return a Boolean (true or false). Check the return value of the function in the documentation to learn more about what is actually returned.
The following lines contain information about the different parameters the function accepts. In this case, the first parameter should be a string object (e.g. "My Script"). The last three parameters are optional, which means that it's not necessary to specify those. However, if you don't specify enough parameters (so if you forget to specify a needed parameter), the function will fail and gives you an error.
With this information, you can understand how to call the function:
code:
MsgPlus.DisplayToast("My Toast", "Hello world!");
or if you want to make use of the CallBack functionality:
code:
function DoOpenChat(sEmail) {
    return Messenger.OpenChat(sEmail);
}

MsgPlus.DisplayToast("My Toast", "Click here to open a conversation with John!", "", "DoOpenChat", "john@hotmail.com");
And that concludes the first lesson in Messenger Plus! Live scripting. :)
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
06-16-2007 08:28 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Can any nice person help me with the basic?(still need help) - by Drakal on 06-15-2007 at 07:05 PM
RE: Can any nice person help me with the basic? - by Chris4 on 06-15-2007 at 07:08 PM
RE: Can any nice person help me with the basic? - by Drakal on 06-15-2007 at 07:13 PM
RE: Can any nice person help me with the basic?(still need help) - by Matti on 06-16-2007 at 08:28 AM
RE: Can any nice person help me with the basic?(still need help) - by Drakal on 06-16-2007 at 11:11 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