Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejavascript
function  GetObjectName(objtype : String, id : String) : String

...

Code Block
languagejavascript
if (Event.SourceType == "GRAY" && Event.Action == "ALARM")
{
  var grayid = Event.SourceId;
  var grayname = GetObjectName("GRAY", grayid);
  var compname = GetObjectParentId("GRAY", grayid, "COMPUTER");
  DoReactStr("DIALOG", "test", "CLOSE_ALL","");
  DoReactStr("DIALOG", "test", "RUN","Alarm in the '" + grayname + "' sensor connected to the '" + compname + "' server."); 
}