Clipboard monitoring

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Oct 13, 2009
3
0
#1
I tried to do a script to be run continuously, monitoring the clipboard. The idea is to use very little CPU, and wake-up when a new text appears in the clipboard.
I need to find out whether the content of the clipboard has been changed. To do that, I need to compare all the %@clip[] until "**EOC**" is found.
This is time consuming, and since it must be repeated continuously, it is inefficient.
Clipboard monitoring would become much easier if we had, for instance, a function to obtain the md5 of the clipboard's content, to be called e.g. md5clip.
By comparing the current md5clip with the previous value, we would immediately realize when the clipboard is changed.
 
Dec 17, 2009
15
0
Germany
#2
If you don't mind an outside solution, take a look at the freeware macro and scripting language AutoHotKey.

It offers functions like ClipWait and onClipboardChange. Integration with TCMD should be possible using the Run command .

Compiled AHK scripts are small and memory-efficient. With a little programming (your own, or that of other users), you can not only monitor the clipboard, but also create multiple clipboards, or append items without overwriting the current content.

Dynamically reassigning keyboard commands and self-expanding abbreviations are other useful features.
 
#3
You might try %@lines[clip:] to see if it changes. I suspect it'll be faster
than using %@clip[] inside the batch file.

On Sat, May 15, 2010 at 2:19 AM, kontamusse <>wrote:


> I tried to do a script to be run continuously, monitoring the clipboard.
> The idea is to use very little CPU, and wake-up when a new text appears in
> the clipboard.
> I need to find out whether the content of the clipboard has been changed.
> To do that, I need to compare all the %@clip[] until "**EOC**" is found.
> This is time consuming, and since it must be repeated continuously, it is
> inefficient.
> Clipboard monitoring would become much easier if we had, for instance, a
> function to obtain the md5 of the clipboard's content, to be called e.g.
> md5clip.
> By comparing the current md5clip with the previous value, we would
> immediately realize when the clipboard is changed.
>
>
>
>
>


--
Jim Cook
2010 Sundays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Monday.