Hello There, Guest! (LoginRegister)

Skinning Documentation

Introduction to Scripting
Getting Started
What's a Messenger Plus! Script?
Scripting Environment
Your First Script
Working with Scripts
From Plugins to Scripts
Packaging your Script
Windows for your Script
Testing your Windows
Objects Reference
Debug Object
Description
Functions
Trace
ClearDebuggingWindow
Properties
DebuggingWindowVisible
Messenger Object
Description
Functions
AutoSignin
Signout
OpenChat
Properties
Version
VersionBuild
ContactListWndHandle
CurrentChats
ReceiveFileDir
MyContacts
MyEmail
MyUserId
MyStatus
MyName
MyPersonalMessage
MyCurrentMedia
MyDisplayPicture
CustomEmoticons
MsgPlus Object
Description
Functions
DisplayToast
DisplayToastContact
CreateWnd
CreateChildWnd
AddTimer
CancelTimer
PlaySound
LockMessenger
LogEvent
RemoveFormatCodes
DownloadFile
UploadFileFTP
LoadScriptFile
ExtractFromZIP
Properties
Version
VersionBuild
ScriptRegPath
ScriptFilesPath
MessengerIsLocked
UILangCode
ChatWnds Object
Description
Functions
Iterator
Properties
Count
ChatWnd Object
Description
Functions
SendMessage
SendFile
AddContact
DisplayInfoMessage
ResetInfoMessage
EditText_GetCurSelStart
EditText_GetCurSelEnd
EditText_SetCurSel
EditText_ReplaceSel
HistoryText_GetCurSelStart
HistoryText_GetCurSelEnd
HistoryText_GetTextRange
Properties
Handle
Contacts
EditText
EditChangeAllowed
ChatLogEnabled
OverrideFmtEnabled
IsMobileChat
Contacts Object
Description
Functions
Iterator
GetContact
Properties
Count
Contact Object
Description
Properties
Email
Network
Status
Name
PersonalMessage
CurrentMedia
Blocked
DisplayPicture
IsFloating
Emoticons Object
Description
Functions
Iterator
GetEmoticon
Properties
Count
Emoticon Object
Description
Properties
Shortcut
Name
PictureFile
PlusWnd Object
Description
Functions
Close
RegisterMessageNotification
GetControlHandle
SendControlMessage
GetControlText
SetControlText
GetElementPos
Button and Checkmark Controls
Button_IsChecked
Button_SetCheckState
Button_SetElementText
ComboBox Controls
Combo_AddItem
Combo_RemoveItem
Combo_GetCurSel
Combo_SetCurSel
Combo_GetItemData
Combo_GetCount
ListBox Controls
LstBox_AddItem
LstBox_GetItemText
LstBox_RemoveItem
LstBox_GetCurSel
LstBox_SetCurSel
LstBox_GetItemData
LstBox_GetCount
ListView Controls
LstView_AddItem
LstView_SetItemText
LstView_GetItemText
LstView_RemoveItem
LstView_GetItemData
LstView_GetCount
LstView_GetSelectedState
LstView_SetSelectedState
LstView_GetCheckedState
LstView_SetCheckedState
LstView_SetItemIcon
Edit and RichEdit Controls
EditBox_SetCurSel
EditBox_ReplaceSel
EditBox_GetCurSelStart
EditBox_GetCurSelEnd
RichEdit_GetTextRange
RichEdit_SetCharFormat
Browser Controls
Browser_GetInterface
Image Elements
ImageElmt_SetImageFile
Properties
Handle
Visible
WindowId
Interop Object
Description
Functions
Call
Call2
FreeDll
GetLastError
Allocate
GetCallbackPtr
DataBloc Object
Description
Functions
GetAt
SetAt
ReadString
WriteString
ReadBSTR
WriteBSTR
ReadWORD
WriteWORD
ReadDWORD
WriteDWORD
ReadInterfacePtr
WriteInterfacePtr
Properties
Size
DataPtr
Events Reference
Messenger Events
OnEvent_Signin
OnEvent_SigninReady
OnEvent_Signout
OnEvent_MyStatusChange
OnEvent_MyNameChange
OnEvent_MyPsmChange
OnEvent_MyMediaChange
OnEvent_ContactSignin
OnEvent_ContactSignout
OnEvent_ContactStatusChange
OnEvent_ContactNameChange
OnEvent_ContactPsmChange
OnEvent_ContactMediaChange
OnEvent_ContactBlocked
OnEvent_ContactUnblocked
OnEvent_ContactListWndCreated
OnEvent_ContactListWndDestroyed
OnEvent_ChatWndCreated
OnEvent_ChatWndDestroyed
OnEvent_ChatWndContactAdded
OnEvent_ChatWndContactRemoved
OnEvent_ChatWndReceiveMessage
OnEvent_ChatWndSendMessage
OnEvent_ChatWndEditKeydown
Messenger Plus! Events
OnEvent_Initialize
OnEvent_Uninitialize
OnEvent_MessengerLocked
OnEvent_MessengerUnlocked
OnEvent_Timer
OnEvent_MenuClicked
OnEvent_EnterPersonalizedStatus
OnEvent_LeavePersonalizedStatus
OnEvent_DownloadFileComplete
OnEvent_UploadFileComplete
OnGetScriptMenu
OnGetScriptCommands
Events Templates
ScriptsCommandTemplate
ToastCallbackTemplate
Interface Windows Events
OnWindowidEvent_Cancel
OnWindowidEvent_Destroyed
OnWindowidEvent_MessageNotification
OnWindowidEvent_CtrlClicked
OnWindowidEvent_ComboSelChanged
OnWindowidEvent_EditTextChanged
OnWindowidEvent_LstBoxSelChanged
OnWindowidEvent_LstBoxDblClicked
OnWindowidEvent_LstViewClicked
OnWindowidEvent_LstViewRClicked
OnWindowidEvent_LstViewDblClicked
OnWindowidEvent_LstViewSelStateChanged
XML Schemas Reference
ScriptInfo File
Information
Examples
Schema Documentation
Interface Windows
Information
Examples
Schema Documentation

Introduction to Scripting

Welcome to the documentation of the Messenger Plus! Live scripting system. This technical documentation is intended to be read by script developers. Whether it is to make your first script, to get more information on a scripting subject or to know the parameters for a given function, you've come to the right place!

The Messenger Plus! Live scripting system is based on Microsoft's JScript 5.6. If you've ever created scripts for web pages then you probably know what JScript, or its cousin JavaScript, is. If not, you don't have to worry, JScript is an easy language to work with for anybody who's done some coding before and that can be learned quickly for those interested in the subject. Despite being simple, JScript also has the advantage of being an object-oriented language that also comes with native support for ActiveX controls, regular expressions and more. For more information about JScript's fundamentals, please visit the MSDN web site. You should spend about an hour reading about the language if you have no idea how it works, don't spend too much time on it though, the best way to learn is by practicing! Just keep the JScript's documentation opened for future reference or find some good tutorials on the web.

Another technology you should be familiar with before you can create full featured Messenger Plus! scripts is XML. XML stands for eXtensible Markup Language and looks a lot like HTML. It is basically a way to define data in text form. If you've never worked with XML before, you'll quickly see how straightforward it can be. A lot of tutorials can be found on the internet and despite the fact that XML can be typed in any text editor, it is highly recommended that you get a good XML editor that will be able to validate your syntax. The Messenger Plus! Live scripting system requires XML in several places that are optional for script beginners like the ScriptInfo configuration file and the script's Windows Interface files. Each of them is defined in an XML Schema file that's meant to be read in graphic form, do not try to read it in XML text form as this will make your task more difficult than it should be. A very good XML editor capable of perfectly rendering XML Schema files is XMLSpy from Altova (the Standard Edition is available as a free trial).

Aside from the language and the technology, what you mostly need is the will to learn how to work with the system. Scripting is "easy" as long as you don't mind spending the first couple of hours wondering how things work. This documentation includes explanation pages, references, examples, ... use them! If you do, you'll be able to script anything you want in Messenger in no time and get exactly what you expect from the software. If you don't feel easy about scripting, just take it one step at a time, spend time in the various topics/examples available, and stick to reproducing what you see while bringing your own small modifications to the existing code. Your first lesson awaits you in what's a Messenger Plus! script.

If you need help about anything related to scripting, whether it's about JScript, XML or one of the functions, feel free to visit the official Messenger Plus! forum. Please remember to search if somebody posted a similar question before you and if the answer was already given: you'll get your answer faster and it will save us some time to help other members. Also, if you become a more advanced scripter with time, it would be appreciated if you could help on the forum and answer people's questions when you know the answer :).

Enjoy!
Patchou

Last update: March 2nd 2009
Documented version: Messenger Plus! Live 4.81
Latest update available at msgpluslive.net.