Notetab paste board feature?

This forum is user-to-user based and not regularly monitored by IDM.
Please see the note at the top of this page on how to contact IDM.

Notetab paste board feature?

Postby DaveCollins » Mon Jul 30, 2012 9:31 am

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
DaveCollins
Newbie
 
Posts: 4
Joined: Mon Jul 30, 2012 9:26 am

Re: Notetab paste board feature?

Postby rhapdog » Mon Jul 30, 2012 10:42 am

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.
User avatar
rhapdog
Master
Master
 
Posts: 253
Joined: Tue Apr 01, 2008 10:02 am
Location: Mississippi, USA

Re: Notetab paste board feature?

Postby DaveCollins » Mon Jul 30, 2012 10:57 am

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
DaveCollins
Newbie
 
Posts: 4
Joined: Mon Jul 30, 2012 9:26 am

Re: Notetab paste board feature?

Postby Mofi » Mon Jul 30, 2012 12:21 pm

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.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 3937
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Notetab paste board feature?

Postby DaveCollins » Mon Jul 30, 2012 12:26 pm

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
DaveCollins
Newbie
 
Posts: 4
Joined: Mon Jul 30, 2012 9:26 am

Re: Notetab paste board feature?

Postby Mofi » Mon Jul 30, 2012 12:40 pm

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.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 3937
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Notetab paste board feature?

Postby rhapdog » Mon Jul 30, 2012 1:41 pm

Sounds like it might be best to implement something like this with AutoHotKey, to where it could work with any text editor.
User avatar
rhapdog
Master
Master
 
Posts: 253
Joined: Tue Apr 01, 2008 10:02 am
Location: Mississippi, USA

Re: Notetab paste board feature?

Postby DaveCollins » Tue Jul 31, 2012 1:32 am

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

Dave
DaveCollins
Newbie
 
Posts: 4
Joined: Mon Jul 30, 2012 9:26 am

Re: Notetab paste board feature?

Postby rhapdog » Tue Jul 31, 2012 10:27 am

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.
User avatar
rhapdog
Master
Master
 
Posts: 253
Joined: Tue Apr 01, 2008 10:02 am
Location: Mississippi, USA


Return to UltraEdit General Discussion