ActiveXperts MSN Object
The Msn object is an instant messaging client object. It allows you to connect to Microsoft's Live Messenger Service and send a basic message to one or more MSN recipients. It provides basic chat features only, i.e. a subset of the features provided by Windows Live Messenger (formerly known as MSN Messenger) which is available for most Windows operating systems. The Msn object doesn't provide enhanced features like emoticons and file transfers.
The features provided by the Network Component Msn object:
- Connect to a Microsoft's Live Messenger Service; server is configurable (default: messenger.hotmail.com);
- Login using a valid MSN account and MSN password;
- Specify one or more MSN recipients;
- Send a text message.
The Network Component Ntp object enables you to add Ntp functionality to your program.
The Ntp object is part of the Network Component. Overview of all Network Component objects:
DnsServer & DnsRecord - Ftp & FtpFile - Http - Icmp - IPtoCountry - Msn - Ntp - Radius - Rsh - Scp - SFtp - Ssh - SnmpManager - SnmpTrapManager - SnmpMibBrowser - Tcp - Tftp - TraceRoute - Udp - Xen - Wake-on-LAN - Xen (Citrix)
MSN Sample code
VBScript sample: Retrieve date and time settings from an NTP server on the internet
Option Explicit Dim objMsn Set objMsn = CreateObject ( "AxNetwork.Msn" ) ' Set Logfile (optional) objMsn.LogFile = "C:\MSNLog.txt" ' Set MSN Account Name objMsn.MsnAccount = ReadInput ( "Enter your MSN account name:", "", False ) ' Set MSN Display Name objMsn.MsnDisplayName = ReadInput ( "Enter your MSN display name:", "", False ) ' Set MSN Password objMsn.MsnPassword = ReadInput ( "Enter your MSN account password:", "", False ) ' Set MSN Message objMsn.Message = ReadInput ( "Enter a message:", "Hello World !!!!", False ) ' Set Recipient objMsn.AddRecipient ReadInput ( "Enter a recipient:", "", False ) ' Send the message objMsn.Send WScript.Echo "Result : " & objMsn.LastError WScript.Echo "Ready." Function ReadInput( ByVal strTitle, ByVal strDefault, ByVal bAllowEmpty ) Dim strInput, strReturn Do strInput = inputbox( strTitle, "Enter value", strDefault ) If ( strInput <> "" ) Then strReturn = strInput End If Loop until strReturn <> "" Or bAllowEmpty ReadInput = strReturn End Function
You can download the full samples here.