1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Clipboard monitoring

Discussion in 'Suggestions' started by kontamusse, May 15, 2010.

  1. kontamusse

    Joined:
    Oct 13, 2009
    Messages:
    3
    Likes Received:
    0
    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.
     
  2. Arminius

    Joined:
    Dec 17, 2009
    Messages:
    15
    Likes Received:
    0
    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. Jim Cook

    Joined:
    May 20, 2008
    Messages:
    605
    Likes Received:
    0
    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:




    --
    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.
     

Share This Page