ObjectType:tasklibrary

From Lavish Software Wiki
Revision as of 14:03, 10 March 2019 by Lax (talk | contribs) (Created page with "{{ObjectType-Vitals|tasklibrary|LavishScript|none|Same as '''ID'''|none|no|void*}} == Description == See Tasks == Members == * ObjectType:string...")
(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)
Jump to navigation Jump to search
Object Type Vitals
tasklibrary
Defined By LavishScript
Inherits none
Reduces To Same as ID
Variable Object Type none
Uses Sub-Types no
C/C++ Type void*

Description

See Tasks

Members

  • string Name: Name of the Task Library
  • int64 ID: ID of the Task Library
  • jsonvalue Task[name]: Retrieve the stored JSON object that defines a Task by a given name. Because a Task Library "is" a JSON object, .Task[name] does the same as .JSON[name]
  • jsonobject JSON: The JSON object containing the set of defined Tasks. (A Task Library "is" a JSON object.)
  • jsonvalue JSON[...]: A shortcut to retrieve a value from the JSON object containing the set of defined Tasks

Methods

  • Clear: Clears all Tasks defined in the Task Library
  • Destroy: Destroys the Task Library, such that it can no longer be found via lavishmachine.TaskLibrary[name]
  • AddTask[name,jsonobject]: Adds a new Task by name. A Task is defined by a JSON object. Example: MyTaskLibrary:AddTask[Hello World,"{\"type\":\"ls1.echo\",\"output\":\"Hello World!\"}"]
  • RemoveTask[name]: Removes a defined Task by name

Examples

See Also

LavishScript Object Types