0

I am trying to write a simple script that parses a file and converts it to a message, the message will be saved in clipboard and then paste it on to a social media app named Wechat in Windows.

The thing is the message needs to contain a special emote image of the app, and what troubles me is the app does not recgnoise the image i copied from my saved local file.

When i copy the emote to my clipboard, i can paste it again inside the app no problem. But when I located the clipboard file location inside my temp file, and try to copy again and send what I think is the exact same image data, the app will just display the png picture with white background instead of opaque.

I know there is no way for the app function to take two same input and produce in different output, but I just cannot figure out how can the inputs differ? So I think it must be the low level mechanism of clipboard or image file can contain extra information that I completely have no idea of.

This has been driving me crazy, I would really appreciate any help.

EDIT: Thanks a lot for Anders answer, but I am a total noob in C. I have read about the registerClipBoardFormat https://learn.microsoft.com/en-us/windows/win32/dataxchg/clipboard-formats, but I have no idea how to even begin to construct such data structure and store it back inside clipboard using python win32 library.

Clipboard data of a sample text string + emote

Sayu
  • 11
  • 1
  • https://www.codeproject.com/articles/168/clipspy – Anders Aug 28 '22 at 10:04
  • OMG, thanks for this! So It really does contain extra information inside clipboard. WOW, that cleared up everything! But now the question is how can I construct such data structure using python win32 library. Do you also happen to know? – Sayu Aug 28 '22 at 12:08

0 Answers0