PostEvent

PostEvent(node, event, tag, …​): bool

Post event on behalf of given object. The event is posted with origin EventOrigin::NXSL.

Table 1. Parameters

node

NetObj

Object to send event on behalf of. Must be an object that can be an event source (for example, node); otherwise script fails with a "bad class" error.

event

Integer or String

Event code or name.

tag

String

User tag associated with event. Optional, can be leaved out or set to null.

…​

String

0 or more event-specific parameters.

Return

TRUE if event was posted successfully or FALSE if not (including unknown event code or name, and missing "send events" access to the object).

PostEvent($node, 100000);
PostEvent($node, 100000, "my tag", "param1", "param2");
PostEvent($node, "MY_EVENT_NAME", null, "param1");