[python-win32] Clipboard Documentation
gw1500
i_was_yah00ed at yahoo.com
Wed Dec 1 09:17:33 EST 2021
On 12/1/2021 3:07 AM, Tim Roberts wrote:
> 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.
>
Hi Tim,
Thanks. That was what I wanted to know.
More information about the python-win32
mailing list