LUALoriotPro WEB site

LoriotPro scripting documentation
Extensions for LUA language

Table of contents Search function

Print the current page Mail this  link UTUBE Channel version française

lpsms.SendSMS - Send a SMS message to the recipient list

LoriotPro has extended the LUA sripting language by providing its own LUA libraries. The new functions provided are dedicated to the creation of monitoring and SNMP automation application.

Syntax

lpsms.SendSMS(list[i],"small message");

Description

The lpsms.SendSMS LUA function send a message to a SMS recipient list. The recipient list is previously fetch with the lpsms.GetSMSRecipientList function.

See the SMS documentation for more details about recipient list.

Parameters

list[i] - A table entry with index i of the Recipient list to select.

Return Values

Return nil if an error occurs

Example

 

if (lp.IsDebugMode()==1) then
lib,init=lp.LoadLibrary(lp.GetPath().."/lua_lp_smsd.dll","libinit");
else
lib,init=lp.LoadLibrary(lp.GetPath().."/lua_lp_sms.dll","libinit");
end if (lib) then init(); lp.Print("ok\n");
a=lpsms.GetSMSRecipientList("list");
if a then
       for i=0,a-1 do
        lp.Print(list[i],"\n");
       lpsms.SendSMS(list[i],"mon message");
       end
end
else
lp.Print("bad\n");
end

 



www.loriotpro.com