alias3
6 discussion posts
Hi,
I am trying to process the contents of the clipboard with a macro, but I run the default macro and it just returns "before text......after text" and hasn't seen the contents of the clipboard.
If I run Clipview, by Peter Buettner, then it shows the clipboard as having only one format of type "50347: CxCellData" with the content that I want (see attached screenshot). Using Clipview I can also paste in new clipboard data into that format and paste back into the application if I get the structure absolutely correct. The data is essentially ASCII but includes a lot of ESC CHAR(@27) characters, and from my testing it is very sensitive to trailing CRLFs (it throws an error, or locks up the application completely if I paste in data that's not quite right)
I am looking for an application where I can script changes to the clipboard contents, and have tried Java's clipboard access methods but they fail to find the data in a format that it can return (I have even put it into Debug mode and stepped through the Java internal libraries, but the OS interface seems to simply discard this data as it doesn't understand the format).
I believe that the application I am trying to interact with is written in VB.
Is it possible to use ClipboardFusion to read and write data into the format "50347: CxCellData" ?
Or do you have any pointers as to how I could go about this?
Thanks
• Attachment [protected]: clipview.png [14,234 bytes]
The app that is setting the clipboard data, is it something we can test here?
Thanks! We've written up a sample macro (attached) that should convert any type of text into regular text. Could you give it a try?
alias3
6 discussion posts
Yes, that works. The macro grabs the application's data and puts it into the clipboard as text.
Is there any way to write data back to the clipboard in the same format? Is there a Clipboard.PutDataObject(data, format) that I could use to write back the modified data?
Also, is there any documentation on these function calls? I was unable to find GetDataObject() on your website.
Thanks
alias3
6 discussion posts
That didn't quite work.
It doesn't insert it into the clipboard with type "CxCellData", instead it puts it in as "49161: DataObject" and "49171: Ole Private Data"
I checked with Thomas on this, and he said it does put those other two data types on the clipboard as well (the .NET Framework handles this) but it shouldn't really matter. Did you modify the macro that I attached at all?
alias3
6 discussion posts
I have tried the unmodified macro and all I get in the clipboard is "49161: DataObject" and "49171: Ole Private Data"
I have just downloaded ClipboardFusion again from your website and reinstalled, just to make sure I am using the latest version, and the behaviour is the same.
FYI, I am running Windows 7 64 bit, and a quick check through "Programs and Features" shows Microsoft .NET Framework 4 is installed.
Hi! That script I wrote that converts a string to CXCellData will need something on the Clipboard already to work. If you copy some text to the Clipboard first, then run the macro, does it create the format you need in the Clipboard?
Aug 10, 2015 (modified Aug 10, 2015)
•
#13
alias3
6 discussion posts
1) I copy "abc" into the clipboard before I run the macro.
2) I use "ClipView" to check the clipboard, it shows formats 1, 7 and 13 - each containing "abc", and format 16 with other data.
3) I run the macro you provided, unmodified, using a hot-key. ClipboardFusion reports "Macro run successfully"
4) ClipView then shows two formats
49161: DataObject. - Raw data size 8 Bytes
49171: Ole Private Data. - Raw data size 18 Bytes
ClipView doesn't show anything when I try to look at the contents of these formats. I don't understand why.
I was expecting ClipView to show a format CxCellData, as it does when I copy the data from the original application.