MCPcopy
hub / github.com/cluic/wxauto / SetClipboardText

Function SetClipboardText

wxauto/utils.py:72–91  ·  view source on GitHub ↗
(text: str)

Source from the content-addressed store, hash-verified

70matedata = bytes(pDropFiles)
71
72def SetClipboardText(text: str):
73 pyperclip.copy(text)
74 # if not isinstance(text, str):
75 # raise TypeError(f"参数类型必须为str --> {text}")
76 # t0 = time.time()
77 # while True:
78 # if time.time() - t0 > 10:
79 # raise TimeoutError(f"设置剪贴板超时! --> {text}")
80 # try:
81 # win32clipboard.OpenClipboard()
82 # win32clipboard.EmptyClipboard()
83 # win32clipboard.SetClipboardData(win32con.CF_UNICODETEXT, text)
84 # break
85 # except:
86 # pass
87 # finally:
88 # try:
89 # win32clipboard.CloseClipboard()
90 # except:
91 # pass
92
93try:
94 from anytree import Node, RenderTree

Callers 6

SendMsgMethod · 0.70
quoteMethod · 0.70
forwardMethod · 0.70
quoteMethod · 0.70
forwardMethod · 0.70
SendMsgMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected