Softros LAN Messenger offers two ways to integrate message sending via Softros LAN Messenger from your app or script. The simpler way is represented in a form of a command-line tool and deeper integration is possible with a dynamic link library (DLL). Both methods require:
Softros LAN Messenger’s messaging/file sending automation can be done by command-line utility MessengerCMD.exe, located in the Softros LAN Messenger installation folder, SDK subfolder. After the program is installed the MessengerCMD command is available from any working directory, so there is no need to use the full path to call it. The tool cannot be used on a system where Softros LAN Messenger is not installed and running.
With MessengerCMD you can:
Parameter | Description |
---|---|
-SendMessage | Sends a message |
-SendFiles | Sends files and folders |
-t:TypeOfRecipient | The type of Recipient must be one of the parameters listed in the Recipient Types section below. |
-r:Recipient | Recipient. The format depends on the type. Can be omitted only if TypeOfRecipient is All. See the Recipient Types section below. |
-ListOfFiles |
List of paths pointing to a file, folder, or a list of files.
|
-m:MessageText |
Text of the message to be sent. Message text must be in double quotes in case any space characters
are present in the message. Any double quote characters inside the message are stripped.
For multi-line messages, \r\n must be used as a line break.
|
Depending on the information known about the recipient one of the following recipient types must be used.
Recipient Type | Utility behavior |
---|---|
UID |
Sends a message to a user using their UID. To retrieve the UID, right-click the user’s name in the
list, and then click Get Information.
|
IP |
Sends a message to an IP address.
|
PCName |
Sends a message to a machine by its name.
|
UserName |
Sends a message to a user using their exact username.
|
Group | Sends a message to all members of a group using the group’s exact name.
|
All |
Sends a message to all users on the list, both online and offline. Sends a files to all online users on the list.
Example: MessengerCmd –SendMessage –t:All –m:"message text" |
Return Code | Description |
---|---|
0 | The command has been executed successfully. |
1 | Error: The recipient has not been found. |
2 | Error: The SDK API is not enabled in the Admin.ini. |
3 | Error: Softros LAN Messenger is not running. |
4 | Error: Required files not found. Reinstall the Softros LAN Messenger. |
Successful execution of the command does not guarantee the message or file has been received by the recipient. For example, in case the recipient is offline, the message is stored for later delivery, while files can be sent only to online users.