A Windows CLI program for sending Skype™ Instant Message (IM)
Introduction
MsgToSkype and LoriotPro
MsgToSkype program installation
Sending Instant Message to a Person
Sending Instant Message to a Category of Skype
Sending LoriotPro alarm messages to Skype client
Setting up the Skype client to receive messages
MsgToSkype information and errors
Introduction
Luteus has released MsgToSKYPE, a Windows Command
Line Interface program (CLI) for sending text messages from any computer
running a Skype client to another Skype client. It can be launched like any
DOS/WINDOWS program under XP or higher Windows platform.
Skype is a next-generation peer-to-peer
software that lets you make free calls and/or chats over the internet to anyone else
who also has the Skype service. It's free and easy to download and use, and it
works with most computers.
MsgToSkype is very simple to use, you only
need to know the Skype ID of the recipient of the message.
Syntax: MsgToSkype -U “Recipient Skype ID”
“My message”
To work the MsgToSkype program requires
that you have a Skype program installed on your PC and a registered Skype ID. Note that the message will effectively be sent by
the Skype client. The MsgToSkype program just gives orders to the Skype client
program for executing a send.
Visit the Skype WEB site for downloading
the Skype client 
MsgToSkype program can be downloaded and used for
free and can be used without any restrictions.
MsgToSkype and LoriotPro
Initially, Luteus software editor has written
MsgToSkype to enable customers to notify network administrators of any alarms that would be generated by the LoriotPro Monitoring software.
In LoriotPro alarm filtering you might want
to trigger a popup alarm window on a remote user PC. The idea behind MsgToSkype
is to simply use the Skype program and its capabilities which is able to send
and receive instant message.
How it works ? LoriotPro is able to trigger an action when
receiving an SNMP trap, a proprietary EVENT or a SYSLOG. The action is defined
in a filter. LoriotPro checks in real time that filter conditions are matched
and launches the according action. LoriotPro is internally designed to process hundreds
of incoming events per second and trigger the appropriate action(s).
As an example, we want to notify network
administrators or IT managers of any type of alarms by sending them a message
that will trigger a popup of the Skype window on their workstation. LoriotPro
will be in charge of triggering the MsgToSkype executable program that will
send the message.
Example of a Skype client receiving
LoriotPro alarms and events:
MsgToSkype program installation
The MsgToSkype program consists of an exe
file and use the Microsoft Windows library Skype4COM.dll (Skype copyright).
Skype4COM is an interface (ActiveX) which represents the Skype API as objects, with properties, commands, and events and notifications. Skype4Com.dll is automatically included together with Skype Extras Manager during Skype installation. If a user has unchecked Extras Manager during installation, Skype4Com library will be unavailable on that machine. In that case register the Skype4COM.dll with the
following Windows CLI command: Regsvr32 Skype4COM.dll
Download MsgToSkype
Unzip it to the directory of your choice.
Remark : The /bin directory is the right place if you want to use it with LoriotPro.
You can now use the MsgToSkype program.
The Visual C++ Redistributable Package (VCRedist_x86.exe) has to be executed on the target system as a prerequisite to installation of the application.
Sending Instant Message to a Person
Preliminary conditions: Before using MsgToSkype you should have a Skype CLient running on your PC with a valid login and you must be signed in.
If the Skype client is not loaded It will be called and load by MsgToSkype but it will work only if the "sign in" is done by default at start up with a default logging name.
To use the MsgToSkype program, open a
command window and type the
Syntax: MsgToSkype –U “Recipient
Skype ID” “My message”
Example:
C:\>msgtoskype -U loriotpro_support "This is a test message"
MsgToSkype is a LUTEUS Copyrighted program. Consult www.loriotpro.com
Require Skype program to be installed and Skype4COM library registered.
Init Skype4COM OK
Skype Client loaded
Connect to Skype API OK
Skype client version 4.1.0.141
COM wrapper version 1.0.32.0
Local Skype ID : loriotpro_sales
Local current user status : Online
Local user fullName : LoriotPro Sales department
Remote Skype ID : loriotpro_support
Sending Instant Message to Remote Skype ID : loriotpro_support
Remote user status : Online
Message status : Sending - Sending - Sent - |
If this is the first time that you launch
MsgToSkype, Skype will popup a warning

Select “Allow this program to use Skype”.
Click OK
On the remote Skype client a popup
(depending on the Skype settings of the chat notification status) will be displayed.

The Chat Message Windows appears in reduced
mode

Opening the Chat window displays the
received messages.

Read the next chapter to know how to use
LoriotPro for sending alarms to a remote network administrator.
Sending Instant Message to a Category of Skype.
At the date we wrote this page, sending an Instant Message with MsgToSkype to a Group cannot be use due to limitation of the Skype4Com component.
To achieve the same goal it is possible to use the Category concept of the Skype interface.
A Category allows to define a set of users and MsgToSkype can use this Category and browse it to send Instant Message sequentially to all users located in this one.
Example of category creation.

Once the new Category created you must drag and drop the users from the All Contact Category to your New Category.
When done you can use the MsgToSkype program with the –CC option and instead of giving a user name you must give the Category Name.
Syntax: MsgToSkype –CC “Category Name” “My message”
The program will try to send the message to all the users assigned to this category.
Warning: do not use Group and only Person in category.
Sending LoriotPro alarm messages to Skype client
To trigger a message to a remote Skype
client you need to know which message you need to filter.
In the following example we use a Loriotpro
Plug-in that verifies the presence of a web server.
In the Event log we can see the event 10011
indicating that the WEB server is not responding.

A right click on this event allows you to
choose the Event Filter Wizard option

In the Action type, choose the Start
Windows Program option. Next choose the MsgToSkype program (You should have
already copied it into the /bin directory of the LoriotPro directory).
The full path is automatically added. If
MsgToSkype is in the /bin directory of LoriotPro the path is not necessary.
Next, click on the wizard button to add the
program’s optional parameters.

In the custom string, complete the
MsgToSkype program with the required parameter.
The Skype ID is loriotpro_support in our
example. This is usually enclosed by quotes but quotes should be replace by the
%Q value.
The %m is also a variable that is the text
message of the initial event. You can also add any of the other variables or
your own text message.
Do not forget to enclose the message by %Q.
You will find more detailed information about
filter settings in the Loriotpro documentation.
To be sure that the message will be sent at
the next occurrence, you should verify it with the Event Simulator.
Open the Event simulator from the menu
Tool->EventSimulator option

Choose the Event number to generate and
keep the other default values. Click on the SendEvent button.
By default each time that LoriotPro will
trigger a MsgToSkype action, a popup like this will appear:

To avoid the screen being displayed with
each action, change the syntax of the action by adding an underscore in front
of the MsgToSkype.
_MsgToSkype.exe –U %Qloriotpro_support%Q
%Q%m%Q
Check with the administrator that the
message has been received.

Don’t forget that you can stop any filter
action at any time by un-checking the action (example below):

Setting up the Skype client to receive messages
To be able to send a message or chat, both
the sender and the recipient must have the Skype client installed. In our
configuration we consider that LoriotPro is the Sender and the Network
administrator the receiver.
But the Skype client is
fully be directional. The receiver can answer to the
Skype messages sent by LoriotPro but LoriotPro will do nothing with the
incoming messages. They will be displayed in the Skype Chat window.
You must first create an account on your
system to be able to use the Skype client.
The first time that you launch Skype the
software will ask you to create an account. In our example the sender will be
the LoriotPro application.

Then you can edit your profile for adding
complementary information Menu File->
Edit Profile

In the menu Tools->Option you can modify
some of your preferences.
The chat appearance can be changed on the
Skype client.
On the Skype receiver side, the chat window
can be customized to display or hide the participants.

The normal aspect displays
the Participant to the conversation like in the example below:

You can get rid of the right panel with the
participant names by selecting the “hide” mode.
In the same menu (option
chat notification window) you can configure the Chat window behavior on alert.

As explained if you select the Notify me
option, the chat window will blink in the taskbar or reopen if necessary.
Fo any customisation, consult the Skype WEB
site and documentation http://support.skype.com/en
MsgToSkype information and errors
The program displays information when
running.
If you do not specify a Skype ID and a
message the system warns you

If the Skype client is not launched,
MsgToSkype will launch it automatically.
Error when not sign in or if Group is used instead of user

This
free software from Luteus is pad enable
Luteus Software Download links and awards
57288
|