Title

Message

Confirm

<< DiscussionsReply

Help w/ a Macro to Paste ... Tab ... Paste ... Clear Clipboard Please.

jcmoxy
2 discussion posts
Hi, I'm trying to create a macro to help me complete an HTML form w the content from the clipboard's history; it should executes in the following sequence: (1) PASTE latest item from Clipboard, (2) TAB, (3) PASTE second latest item from Clipboard and (4) CLEAR clipboard contents. I'm not experienced w/ C# ... The following is my best shot so far, and needs some debugging assistance:

Code


Thanks for your time and effort.
May 23, 2018 (modified May 23, 2018)  • #1
Thomas Malloch (BFS)'s profile on WallpaperFusion.com
I put together some code that should work for you, based on the code you provided. It looks like you were really close to getting it working! The only mistake you made was that the "return" statement actually makes the function exit, so not all of your code was run.

Here's what I put together:

Code



I hope this works for you!
May 24, 2018  • #2
jcmoxy
2 discussion posts
Thank you so much! I do have a related question though. I expected the clear clipboard statement ( BFS.Clipboard.Clear(); ) to clear the Clipboard Manager of its entries. It did not. Is the Clipboard Manager a separate process not showing the contents of the clipboard, but instead the content that CliboardFusion has worked with?
May 25, 2018 (modified May 25, 2018)  • #3
Thomas Malloch (BFS)'s profile on WallpaperFusion.com
You're exactly right!

The Windows Clipboard has a lot of limitations, one of which being only storing one thing at a time on the Clipboard. ClipboardFusion tries to get around this by watching and storing most of the contents so that you can use it at a later time.

As for your problem, there isn't actually a clear function built into the lists because we felt it was a little too dangerous, but you can remove one item at a time. If you throw it in a loop, you should be able to clear all the items. Here's some example code:

Code



I hope this helps!
May 29, 2018 (modified May 30, 2018)  • #4
Was this helpful?  (1)  
<< DiscussionsReply