Versions Compared

Key

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

Description

This function adds a new SCRIPT task definition during runtime.

Signature

nxa.AddScriptTask (string, string, bool, bool, bool, number, string, number)

Parameters

NameTypeMandatory/OptionalDescription
sourceItemID stringM
destinationItemIDstringM
triggerOnReceiveboolMcorresponds to the OnReceive parameter of the task definition
triggerOnSendboolMcorresponds to the OnSend parameter of the task definition
triggerOnSetboolMcorresponds to the OnSet parameter of the task definition
delaynumberMtime interval in milliseconds that the task will be delayed when triggered
scriptstringMLUA script name that will be executed when the task is triggered
moduleIDnumberOHas to be > 1000. Can be referenced in the nxa.RemoveScriptTask function.

Return

TypeDescriptionstringTaskID for reference in nxa.RemoveItemTask(), nxa.ActivateItemTask(), nxa.DeactivateItemTask().