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

Method get

source/binding/Python/maa/buffer.py:145–157  ·  view source on GitHub ↗

获取字符串列表 / Get string list Returns: List[str]: 字符串列表 / String list

(self)

Source from the content-addressed store, hash-verified

143 Library.framework().MaaStringListBufferDestroy(self._handle)
144
145 def get(self) -> list[str]:
146 """获取字符串列表 / Get string list
147
148 Returns:
149 List[str]: 字符串列表 / String list
150 """
151 count = Library.framework().MaaStringListBufferSize(self._handle)
152 result: list[str] = []
153 for i in range(count):
154 buff = Library.framework().MaaStringListBufferAt(self._handle, i)
155 s = StringBuffer(buff).get()
156 result.append(s)
157 return result
158
159 def set(self, value: list[str]) -> bool:
160 """设置字符串列表 / Set string list

Callers 5

node_listMethod · 0.95
custom_action_listMethod · 0.95
custom_action_listMethod · 0.95

Calls 4

frameworkMethod · 0.80
StringBufferClass · 0.70
getMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected