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

Method set

source/binding/Python/maa/buffer.py:48–59  ·  view source on GitHub ↗

设置缓冲区内容 / Set buffer content Args: value: 字符串或字节数据 / String or bytes data Returns: bool: 是否成功 / Whether successful

(self, value: Union[str, bytes])

Source from the content-addressed store, hash-verified

46 return ctypes.string_at(buff, sz).decode()
47
48 def set(self, value: Union[str, bytes]) -> bool:
49 """设置缓冲区内容 / Set buffer content
50
51 Args:
52 value: 字符串或字节数据 / String or bytes data
53
54 Returns:
55 bool: 是否成功 / Whether successful
56 """
57 if isinstance(value, str):
58 value = value.encode()
59 return bool(Library.framework().MaaStringBufferSetEx(self._handle, value, len(value)))
60
61 @property
62 def empty(self) -> bool:

Callers 6

_c_request_uuid_agentMethod · 0.95
_c_shell_agentMethod · 0.95
_c_get_info_agentMethod · 0.95
__init__Method · 0.95
appendMethod · 0.95
_c_analyze_agentMethod · 0.95

Calls 1

frameworkMethod · 0.80

Tested by

no test coverage detected