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.
Well... Here it is:
from tkinter import Tk def copy_clipboard(): clipboard = Tk().clipboard_get() return clipboard
Tk().clipboard_get() returns the current text in the clipboard.
Tk().clipboard_get()
And you need to use pyautogui.hotkey('ctrl', 'c') first.
pyautogui.hotkey('ctrl', 'c')