Copy highlighted text to clipboard, then use the clipboard to append it to a list

后端 未结 5 1022
刺人心
刺人心 2020-12-16 18:54

I\'m trying to automate some actions in a browser or a word processor with pyautogui module for Python 3 (Windows 10).

There is a highlighted text in a browser.

5条回答
  •  星月不相逢
    2020-12-16 19:19

    You could import pyperclip and use pyperclip.copy('my text I want copied') and then use pyperclip.paste() to paste the text wherever you want it to go. You can find a reference here.

提交回复
热议问题