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 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:
Usage: MessengerCmd –SendMessage –t:TypeOfRecipient –r:Recipient –m:MessageText
|-SendMessage||Sends a message|
|-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.|
|-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. No line breaks are supported.|
Depending on the information known about the recipient one of the following recipient types must be used.
|Recipient Type||Utility behavior|
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.
Sends a message to an IP address.
Sends a message to a machine by its name.
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.
Sends a message to all users on the list, both online and offline.
Example: MessengerCmd –SendMessage –t:All –m:"message text"
|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 has been received by the recipient. For example, in case the recipient is offline, the message is stored for later delivery.