Jump to content

Access nonstandard clipboard data


Recommended Posts

I am working with a program called CoDeSys used for programming PLCs that does not let you copy&paste between 2 different instances of the software. You can only paste within the same program.

I've tried inspecting the clipboard contents with various tools, but it doesn't seem to capture anything other than standard text. So I am guessing they are using some sort of private or custom clipboard management internal to the software?

Just thought I would ask here if anyone had any ideas on hooking into this private data or confirm my suspicion that there is nothing I can do about it.

Thanks

Link to comment
Share on other sites

  • 2 weeks later...

Hi @kurtykurtyboy.

_ClipBoard_GetData is a good place to start :)

also to check the formats available in the clipboard, see _ClipBoard_EnumFormats, the example should be able to give you some information i think :)

Link to comment
Share on other sites

Also note that not all clipboard formats are in this enum.

Last time I checked I got unlisted formats as well, which as @genius257 said afterwards are registered on demand with varying IDs.

 

Edited by jchd

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

15 hours ago, jchd said:

Also note that not all clipboard formats are in this enum.

Last time I checked, I got listed and unlisted formats. I suspect more formats codes exist.

Those extra formats provided may not have the same id on another machine or another boot on some machine, as any program can register a format and the order of the formats registering are dependent on who registers first.

for example, text/_moz_htmlcontext is 49613 on my machine currently.

That is why i mentioned the example in the _ClipBoard_EnumFormats documentation.

Link to comment
Share on other sites

Thanks for the tip, I didn't know the proprietary ids were assigned/registered on the fly as apps demand.

Sorry for the noise.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

Thanks for the tips, I really appreciate it.

I've tried the _ClipBoard_EnumFormats example and various other tools and determined that when I copy text only, it uses the clipboard. But when I try copying anything else (programming blocks in this case), the clipboard doesn't change at all.

I think I have accepted the fact that this program just does not use the Windows clipboard. It must have some internal data management. Which is probably why I can't copy between program instances in the first place. I can workaround it by using export/import, but it's a pain and seems like such a waste to not have copy/paste..

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...