2017年3月3日 星期五

用pyperclip紀錄剪貼簿內容

  1. import time
  2. import pyperclip
  3. the_words = []
  4. while True:
  5. time.sleep(0.5)
  6. if pyperclip.paste() not in the_words:
  7. print(pyperclip.paste())
  8. the_words.append(pyperclip.paste())

每0.5秒偵測一次,如果有新的剪貼內容就印出來。

沒有留言:

張貼留言