Executes a named Command property on the named target within the named scene, using reflection. Returns false if the target is missing, the command property does not exist, or the command's CanExecute is false.
ExecuteTargetCommandById(targetId, commandName)
bool
Executes a named Command property on a target identified by its GUID (case-insensitive), searching every scene. Returns false if the target is missing, the command property does not exist, or the command's CanExecute is false.
// Start a target on connector trigger
function OnConnectorStartStream() {
var ok = Project.ExecuteTargetCommand("Scene", "SRT Output", "StartCommand");
return { result: ok ? "ok" : "error", httpStatus: ok ? 200 : 500 };
}