Command line tool for integration already exist - it's called nxevent. It's available on WIndows in server and management console packages, and if you need to build it on UNIX, you must use --with-client option for configure. This tool uses client library for communication with server, and therefore requires login and password. User used for sending event must have "Send events" right on object given as source for event.
Best regards,
Victor
Best regards,
Victor