Files
kefu/wechat_rpa/test_clipboard.py
2026-07-16 12:11:05 +08:00

21 lines
458 B
Python

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]}")