This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

SMS - Twilio
#11
(02.08.2022, 11:38)admin Wrote: Post your whole script with the for loop. There's should not be any difference between the loop and copy/pasted multiple sms function calls.
Code:
value = event.getvalue()
if value then
 
from_nr = '+****'
to_nrs = { '+***', '+***', '+***' }
id_nr = '***' -- put your ID here
token_nr = '***' -- put your token here
for _, to_nr in ipairs(to_nrs) do
  sms(id_nr, token_nr, from_nr, to_nr, 'Alarm HCWC 009 changed to Alarm ON')
end
else
from_nr = '+****'
to_nrs = { '+***', '+***', '+***' }
id_nr = '***' -- put your ID here
token_nr = '***' -- put your token here
for _, to_nr in ipairs(to_nrs) do
  sms(id_nr, token_nr, from_nr, to_nr, 'Alarm HCWC 009 changed to Alarm OFF')
end


end
Reply


Messages In This Thread
SMS - Twilio - by Fahd - 02.08.2022, 06:24
RE: SMS - Twilio - by admin - 02.08.2022, 07:47
RE: SMS - Twilio - by Fahd - 02.08.2022, 08:23
RE: SMS - Twilio - by admin - 02.08.2022, 08:41
RE: SMS - Twilio - by Fahd - 02.08.2022, 09:53
RE: SMS - Twilio - by admin - 02.08.2022, 09:57
RE: SMS - Twilio - by Fahd - 02.08.2022, 10:18
RE: SMS - Twilio - by admin - 02.08.2022, 10:37
RE: SMS - Twilio - by Fahd - 02.08.2022, 10:54
RE: SMS - Twilio - by admin - 02.08.2022, 11:38
RE: SMS - Twilio - by Fahd - 02.08.2022, 11:46
RE: SMS - Twilio - by admin - 02.08.2022, 12:05
RE: SMS - Twilio - by Fahd - 02.08.2022, 12:23

Forum Jump: