install:- pip install pyperclip
URL:- https://pypi.org/project/pyperclip/
import time import sys import os from time import strftime sys.path.append(os.path.abspath("SO_site-packages")) import pyperclip recent_value = "" D = time.strftime("%D") r = time.strftime("%r") while True: tmp_value = pyperclip.paste() if tmp_value != recent_value: recent_value = tmp_value print("Value changed: %s" % str(recent_value)[:20]) with open('out_clipboard.txt', '+a') as output: try: output.write("[Start]----------------"+D+" "+r+"----------------\n") output.write("%s\n\n" % str(tmp_value)) output.write("[End]-----------------------------------------------------------------\n\n\n") except: output.write("[Start]----------------" + D + " " + r+"----------------\n") output.write("%s\n\n" % str(tmp_value.encode('UTF-8'))) output.write("[End]-----------------------------------------------------------------\n\n\n") time.sleep(0.1)
This tool will help you to automatically copy and paste any thing without pressing ctrl+V or paste from mouse menu.
Watch the video to get better understanding to how this tool works.
You can tweak a little to create your own custom tool.
Hope you like the tutorial.
Git:- https://github.com/joeldcosta/pysnake/blob/eec2cce0c2f3d63c14468aee03a7e5daec5c2285/Clipboard_AutoPaste_TOOL.py#L1