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.

Multiple event-scripts in 1 script
#4
Hi,

Can you test if this is working?

Code:
-- Perform action only on value true
if event.getvalue() == true then
 
 -- Load lib
 require('ssl.https')
 require('socket.url')
    
 -- Set parameters
 APIUser = 'YOUR_API_USERTOKEN'
  APIPassw = 'YOUR_API_PASSWORD'
  APIId = 'YOUR_API_ID'
  Sender = '123456789'
  PhoneNumber = '987654321'
  SMSText = socket.url.escape('value of ' ..  grp.find(event.dst).name .. ' is true')

 -- Build URL
  url = "https://api.clickatell.com/http/sendmsg?user="..APIUser.."&password="..APIPassw.."&api_id="..APIId.."&from=+"..Sender.."&to="..PhoneNumber.."&text="..SMSText
 
 -- Send Request
 res, code, headers, status = ssl.https.request(url)

end
BR,

Erwin
Reply


Messages In This Thread
Multiple event-scripts in 1 script - by Mr.D - 24.04.2017, 17:33
RE: Multiple event-scripts in 1 script - by Erwin van der Zwart - 30.04.2017, 20:12

Forum Jump: