26 lines
572 B
Python
26 lines
572 B
Python
if __name__ != "__main__":
|
|
import unittest
|
|
|
|
raise unittest.SkipTest("手工剪贴板交互诊断脚本")
|
|
|
|
import time
|
|
import pyautogui
|
|
import pyperclip
|
|
|
|
print("Please open WeCom chat window and keep it active.")
|
|
time.sleep(3)
|
|
old = pyperclip.paste()
|
|
print(f"Old clipboard: {old}")
|
|
|
|
# Click in the center of the active window
|
|
pyautogui.click()
|
|
time.sleep(0.2)
|
|
pyautogui.hotkey('ctrl', 'a')
|
|
time.sleep(0.2)
|
|
pyautogui.hotkey('ctrl', 'c')
|
|
time.sleep(0.5)
|
|
new = pyperclip.paste()
|
|
|
|
print(f"New clipboard length: {len(new)}")
|
|
print(f"New clipboard snippet: {new[:100]}")
|