Mar-05-2024, 07:34 AM
Hi,
When a user wants to save a document , that is shown in the tKinter canvas area of the gui,
he hits a button, and a screenshot is taken to the clipboard , and saved. (Using the box(...) method to copy only the canvas part.)
I'm using pyscreenshot. Works like a charm.
But, when the user does this a second time in a row, the app goes haywire. (eg. it starts a second instance of the app)
I'm testing what could cause this behaviour, and my question is:
Can I "flush" the clipboard of a PC, to empty it from the screenshot that was taken an saved a moment before.
I have not found anything, but maybe "flush" is the wrong term.
And maybe i have to look outside pyscreenshot.
ANy ideas ?
thx,
Paul
When a user wants to save a document , that is shown in the tKinter canvas area of the gui,
he hits a button, and a screenshot is taken to the clipboard , and saved. (Using the box(...) method to copy only the canvas part.)
I'm using pyscreenshot. Works like a charm.
But, when the user does this a second time in a row, the app goes haywire. (eg. it starts a second instance of the app)
I'm testing what could cause this behaviour, and my question is:
Can I "flush" the clipboard of a PC, to empty it from the screenshot that was taken an saved a moment before.
I have not found anything, but maybe "flush" is the wrong term.
And maybe i have to look outside pyscreenshot.
ANy ideas ?
thx,
Paul
It is more important to do the right thing, than to do the thing right.(P.Drucker)
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.