| 70 | matedata = bytes(pDropFiles) |
| 71 | |
| 72 | def 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 | |
| 93 | try: |
| 94 | from anytree import Node, RenderTree |