[python-win32] Not able to paste file in windows explorer using SetClipboardData

game4 sale gamz4sale at gmail.com
Thu May 22 05:21:14 CEST 2014


I tested my code today on Win 7 64 bit, and it worked almost perfect like
Tim said.

If the previous clipboard content was Text, my code works perfectly.

The failure part is:
1) Copy *Image1* from Explorer
2) Run my code to update clipboard with *Image2*
3) Paste operation in Wordpad application or Explorer ends up with only
*Image1*

Any clues please?Am i missing something?
Also how about the OleSetClipboard()? Do you guys think it will improve my
case?



On Thu, May 22, 2014 at 1:02 AM, game4 sale <gamz4sale at gmail.com> wrote:

> Thank you very much for your time.
>
> Thats strange. For the login user, i think its same. In my Taskmanager,
> under User tab, both the processes are running under same user.
>
> I also tried to run my script from command prompt with Admin previlege.
> Still same, i cannot paste the file in Explorer.
>
> Also, i found out another problem in my code. I can paste the image in
> Wordpad application only if the last clipboard content was text.
> If the last one was image, i cannot paste my new image. It pastes only the
> old image.
>
>
>
>
> On Thu, May 22, 2014 at 12:29 AM, Tim Roberts <timr at probo.com> wrote:
>
>>  game4 sale wrote:
>>
>>
>>
>>   I am trying to copy an image file to windows clipboard using my code
>> and paste it manually in any folder in windows explorer. I am using *Windows
>> 8* *64bit *laptop, running *Python 2.7 *and *pywin32-218* for win32 APIs
>>
>> I managed to paste my file in Wordpad application. But, i cannot paste
>> inside windows explorer. The Paste menu is disabled. Any help/suggestions
>> would be much appreciated.
>>
>>
>> I'm confused.  I just ran your exact code on Win 7 64 with Python 2.7.5
>> 32, unchanged except for the file name, and it worked perfectly.
>>
>> Is the script running as the same login user as Explorer?
>>
>> --
>> Tim Roberts, timr at probo.com
>> Providenza & Boekelheide, Inc.
>>
>>
>> _______________________________________________
>> python-win32 mailing list
>> python-win32 at python.org
>> https://mail.python.org/mailman/listinfo/python-win32
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20140522/d8f178d9/attachment.html>


More information about the python-win32 mailing list