ScriptTreeObject

class ScriptTreeObject.ScriptTreeObject

Bases: object

Common base functionality for ScriptObject and ScriptProject.

property project

Gets the project.

This returns “this” rsp. “self” if called on Projects.

Return type:

ScriptProject

property handle

Gets the internal Automation Platform handle of the Project.

This handle is primarily useful for other Atomation Platform plugins which provide functionality for scripts via ScriptDriver. When they consume ScriptProject as their parameters, they can use the handle to gain access to the underlying Automation Platform object.

Return type:

int

find(name, recursive=False)

Finds objects matching the given name.

Names are not unique in the tree, so several Objects can be delivered. The search is against the nonlocalized name.

Parameters:
  • name (str) – The Name.

  • recursive (bool) – Whether we search recursively.

Return type:

list[ScriptObject]

Returns:

The collection of objects.

get_children(recursive=False)

Gets the children of our object.

Parameters:

recursive (bool) – If set to True, we work recursively.

Return type:

list[ScriptObject]

Returns:

All child objects.

property is_root

Gets a value indicating whether this instance is the root of the object tree.

This returns true for all ScriptProject instances, and false for all ScriptObject instances.

Return type:

bool