MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / controller

Method controller

source/binding/Python/maa/tasker.py:93–106  ·  view source on GitHub ↗

获取关联的控制器 / Get bound controller Returns: Controller: 控制器对象 / Controller object Raises: RuntimeError: 如果获取失败

(self)

Source from the content-addressed store, hash-verified

91
92 @property
93 def controller(self) -> Controller:
94 """获取关联的控制器 / Get bound controller
95
96 Returns:
97 Controller: 控制器对象 / Controller object
98
99 Raises:
100 RuntimeError: 如果获取失败
101 """
102 controller_handle = Library.framework().MaaTaskerGetController(self._handle)
103 if not controller_handle:
104 raise RuntimeError("Failed to get controller.")
105
106 return Controller(handle=controller_handle)
107
108 @property
109 def inited(self) -> bool:

Callers

nothing calls this directly

Calls 2

frameworkMethod · 0.80
ControllerClass · 0.70

Tested by

no test coverage detected