Messenger Plus! Live - Scripting Documentation

You can copy paste any of the following examples to a new xml file (a text file with an ".xml" extension). Remember to copy the schema file in the same directory to get your file validated.

Example 1

Simple ScriptInfo file used to create a Script Pack:

<ScriptInfo xmlns="urn:msgplus:scripts" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="urn:msgplus:scripts PlusScripts.xsd">

	<Information>
		<Name>Test Script</Name>
		<Description>This script is an example from the documentation.</Description>
		<AboutUrl>http://www.msgpluslive.net</AboutUrl>
		<Version>1.00</Version>
	</Information>

</ScriptInfo>

Example 2

ScriptInfo file used to create a Script Pack. During import, the "ExtraFuncVB6.dll" ActiveX will be registered with regsvr32. The "ExtraFuncCSharp.dll" .NET Object will be registered for COM Interop with regasm.

<ScriptInfo xmlns="urn:msgplus:scripts" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="urn:msgplus:scripts PlusScripts.xsd">

	<Information>
		<Name>Test Script</Name>
		<Description>This script is an example from the documentation.</Description>
	</Information>

	<OleFiles>
		<FileName>ExtraFuncVB6.dll</FileName>
	</OleFiles>
	
	<DotNetFiles>
		<FileName>ExtraFuncCSharp.dll</FileName>
	</DotNetFiles>

</ScriptInfo>

Example 3

This ScriptInfo file defines a menu that will be displayed when the user clicks on the Plus!/Scripts icon in the contact list or in a chat window.

<ScriptInfo xmlns="urn:msgplus:scripts" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="urn:msgplus:scripts PlusScripts.xsd">

	<Information>
		<Name>Test Script</Name>
	</Information>

	<ScriptMenu>
		<MenuEntry Id="MnuFeat1">Feature 1</MenuEntry>
		<MenuEntry Id="MnuFeat2">Feature 2</MenuEntry>

		<SubMenu 	Label="Advanced">
			<MenuEntry Id="MnuAdvFeat1">Advanced Feature 1</MenuEntry>
			<MenuEntry Id="MnuAdvFeat2">Advanced Feature 2</MenuEntry>
		</SubMenu>
	
		<Separator/>
		<MenuEntry Id="MnuAbout">About...</MenuEntry>
	</ScriptMenu>

</ScriptInfo>

Example 4

This ScriptInfo file defines a list commands displayed in the Command Browser window (when the user types "/" in a chat window).

<ScriptInfo xmlns="urn:msgplus:scripts" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="urn:msgplus:scripts PlusScripts.xsd">

	<Information>
		<Name>Test Script</Name>
	</Information>
	
	<ScriptCommands>
		<Command>
			<Name>beep</Name>
			<Description>Play 	a beep sound</Description>
		</Command>
	
		<Command>
			<Name>flash</Name>
			<Description>Flashes the window</Description>
			<Parameters>&lt;flash count&gt;</Parameters>
		</Command>
	</ScriptCommands>

</ScriptInfo>

See Also

ScriptInfo File Information, Schema Documentation.