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.
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.