Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

clipboard access

Tags:

python

windows

I am trying to retrieve texts from the clipboard using Python module called win32clipboard, as it is described here. But Windows 7 does not allow to access the clipboard with the error 1418 - ERROR_CLIPBOARD_NOT_OPEN as I use:

data = win32clipboard.GetClipboardData()

How can I defeat the system and get the data?

like image 217
Philip Minlos Avatar asked Mar 04 '26 04:03

Philip Minlos


1 Answers

Make sure you have not opened the clipboard twice. You must close it then reopen it.

The open-close operations can't be nested.

like image 131
thinker3 Avatar answered Mar 06 '26 17:03

thinker3



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!