Notetab paste board feature?

Notetab paste board feature?

4

    Jul 30, 2012#1

    Hello all,

    I'm a recent convert from Notetab Pro, and really like some of the features in UltraEdit.

    One thing that's missing for me (as far as I can see) is the pasteboard. In NTB you'd turn this on within a document, and then whenever new text was copied in other applications, it would automatically be pasted at the end of the document. Very useful indeed.

    Is there a way I can do this in UltraEdit?

    Thanks in advance,

    Dave Collins

    2362
    MasterMaster
    2362

      Jul 30, 2012#2

      It should be possible to write a script that would loop until canceled. Utilizing the "clipboardContent" script command, you should be able to, within that loop, assign the clipboardContent to a variable. On subsequent iterations of the loop, check the variable against clipboardContent to see if it has been changed, and if so, use the paste command to paste it into the active document and assign the new value to the variable.

      4

        Jul 30, 2012#3

        Thanks for that. I'll look into this... scripting isn't my forte, but I'll give it a go.

        Thanks for replying - much appreciated!

        Dave

        6,686585
        Grand MasterGrand Master
        6,686585

          Jul 30, 2012#4

          DaveCollins wrote:... whenever new text was copied in other applications, it would automatically be pasted at the end of the document.
          That's most likely not possible with UltraEdit as it would require a Windows clipboard observer thread running in background which gets an event message from Windows whenever something is copied/cut to Windows clipboard. Or a background process is started which takes over Copy/Cut functions of Windows to get the strings, paste them into a file and calls next standard Windows Copy/Cut functions. It is not possible to write such processes with script language of UltraEdit.

          There are perhaps command line or small GUI tools which can be called from withing UltraEdit with name of current file and which append all text copied/cut to Windows clipboard to the specified file. When switching back to UltraEdit, UE would detect automatically the modification of the file and asks for reloading the file or reloads the file automatically depending on configuration.

          4

            Jul 30, 2012#5

            Hmmm - not what I wanted to hear, but thanks anyway!

            I suppose I may have to live without this feature, or use NTP just for this purpose.

            Thanks,

            Dave

            6,686585
            Grand MasterGrand Master
            6,686585

              Jul 30, 2012#6

              Well, it would be possible to write an UltraEdit script which permanently checks in an endless loop contents of Windows clipboard for modification and pastes automatically a modification to active document at bottom. Something like:

              Code: Select all

              UltraEdit.activeDocument.bottom();
              UltraEdit.selectClipboard(0);
              var sCopyOfClipboard = UltraEdit.clipboardContent;
              while(true) {
                 if(sCopyOfClipboard != UltraEdit.clipboardContent) {
                    UltraEdit.activeDocument.paste();
                    sCopyOfClipboard = UltraEdit.clipboardContent;
                 }
              }
              But that is not very smart. One core of the CPU is now surely running at 100% with this script executed. And the small dialog to break script execution is always on top. And of course the entire performance of the computer would suffer on this not event triggered approach to emulate a paste board. This little script works, but is definitely not a smart approach.

              2362
              MasterMaster
              2362

                Jul 30, 2012#7

                Sounds like it might be best to implement something like this with AutoHotKey, to where it could work with any text editor.

                4

                  Jul 31, 2012#8

                  Some great ideas here - thank-you very much all!

                  Dave

                  2362
                  MasterMaster
                  2362

                    Jul 31, 2012#9

                    Okay, after further thought, I have a solution for you that will work not only with UltraEdit and UEStudio, but anything out there.

                    Use Ditto (http://ditto-cp.sourceforge.net/)

                    It will allow you to continually press Ctrl+C as it places everything you copy into its database. Then, you can select what you want to paste, one item, several, or all, and paste it all at once into any application.

                    I'm finding this quite a handy little tool, and the good part is, it doesn't limit you to using a single text editor.

                    Oh, yes. You have the option of "pasting" everything in "Plain Text" format, in case you're copying things that are formatted in some other way.