Open luis-arch opened 1 year ago
the issue is in your code not with pyperclip
You may want to try the pyperclip.waitForNewPaste()
function, which blocks until the text on the clipboard has changed.
It also has a optional timeout
parameter which can be set to your desired timeout, in seconds.
If not provided, the timeout defaults to None
.
In the following code, I try to determine whether the clipboard has changed, so as to execute the function of the clipboard change. But the clipboard change function is called many times without any change in the clipboard itself. I didn't encounter problems during the debugging process, but when I actually ran the code, an error occurred. I feel like I'm making a very basic problem, but I can't figure out what I'm doing wrong. The python version I am running is 3.6. The version of pyperclip running is 1.8.2.