How to run script on gateway

Hi!
How can I run a script on gateway when I click on a button?

You could:

  1. write to a tag that has a tag change script on it, which will run in gateway scope.
  2. use a message handler and system.util.sendMessage or system.util.sendRequest:
    https://docs.inductiveautomation.com/display/DOC79/system.util.sendMessage
    https://docs.inductiveautomation.com/display/DOC79/system.util.sendRequest
5 Likes