[python-win32] Clipboard Documentation
Tim Roberts
timr at probo.com
Wed Dec 1 03:07:43 EST 2021
On 11/30/21 7:04 AM, gw1500 via python-win32 wrote:
>
> Thanks for the reply. I read about that but was hoping to use pywin32.
> I can see now the folly of that decision.
>
> I have a working minimal test but am looking for something a bit more
> automated. I bring my app window to the top using pywin32 and a line I
> need is already highlighted. I can ctrl-c from the keyboard and
> pyperclip works just fine. However, since the line is already
> highlighted is there a way to get it without user interaction (ctrl-c)?
I don't know how much trouble you want to go to. If you can get the
window handle of the text box that has your text, you can send a WM_COPY
message to it. With the standard controls, that tells it to do a "copy"
operation with the currently selected text.
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the python-win32
mailing list