I'm trying to do something along the lines of this:
#setup stuff
from Tkinter import Tk
clp=Tk()
clp.withdraw() #keep window from showing
clp.clipboard_clear()
stuff=['this','is','stuff'])
count = 0
while 1:
if(clp.userPastesClipboard()): #is there a some sort of function for this?
if(count <= len(stuff)):
clp.clipboard_append(stuff[count])
count += 1
else:
exit()
I basically just want to be able to trigger an if/while statement when the user pastes from the clipboard (to any application). I don't have to use the Tkinter library, so if there's a better library to use for this let me know, though if I can do it with Tkinter that's even better. Using Python 2.7. I prefer to use standard libraries if possible, but will use 3rd party if absolutely necessary. Thanks.