Page 1 of 1

New npClip NeoPlugin for NeoBook

PostPosted: Fri Mar 30, 2012 9:18 am
by dec
Hi to all!

This plugin allow you to get informed when the clipboard change, with the possibility to use more than one Clip object instances to get notify separatelly. Also the plugin allow you to work with your own registered clipboard formats.

You can register your own clipboard formats in order to paste and copy data with this formats, in the same publication and between publications. Register the clipboard formats that you need and create the Clip objects that you need too.

You can download the npClip from here.

PostPosted: Fri Mar 30, 2012 11:35 am
by datadon
Hi David

Can you explain a bit more about the clip formats. I have not heard of that term before. Does that mean that I could copy a Word.doc file to the clipboard and then modify the text with a string replace and copy it back to a file and it would still be a word.doc with all the formatting intact?

Or ?

PostPosted: Fri Mar 30, 2012 11:45 am
by dec
Hi Donald,

First of all, thanks for your interest. The clipboard formats allow you to copy certain information in the clipboard that only your publication/s recognized. What kind of data? At this time we talk about strings, of course the content of an entire file. The clipboard formats allow you to put certain data in the clipboard, that can be reading by applications that recognize such format. For example, your own publication can recognize the clipboard format, even if we talking about various publications running at the same time. You can put on the clipboard whatever you want.

When you copy something to the clipboard with a specific format, other aplications, for example, the Windows Notepad, cannot paste the content of the clipboard, because this are in your own registered format. But your publications can recognize this clipboard format and can retrieve the information from the clipboard. Also the plugin implement the appropiate Windows API in order to act like a clipboard monitor. So whenever the clipboard changes, from your publication or from other Windows program, you can get notified. This allow you, for example, to disable or enable some publication elements (buttons, menus) if the content of the clipboard is in the format that you expected, for example.

A possible example of use? Supose you have two listbox in your publication, and want to allow the user to copy the selected items into the clipboard. So you can use an specific clipboard format to copy the listbox items, and then, from the same publication or another publication that recognize the format, can paste the items into the appropiate listboxes. This is only a sample, but you can copy to the clipboard the data that you wanted, in a format that can be recognized by your publications.

Hope this can ilustrated a bit more the possible uses of the npClip plugin. If you have any other doubt don't hesitate to comment here and I try to help you as quickly as possible. ;)

PostPosted: Fri Jun 22, 2012 1:17 pm
by Wrangler
Have a question: I've managed to get clips copied to the clipboard into a combobox. Easy to do. Now I want to paste the contents of the combobox variable into another application such as notepad etc.

Any ideas? The problem is getting a window handle of the target application, which may never be the same, focusing it and then pasting.

PostPosted: Fri Jun 22, 2012 1:31 pm
by dec
Wrangler wrote:Have a question: I've managed to get clips copied to the clipboard into a combobox. Easy to do. Now I want to paste the contents of the combobox variable into another application such as notepad etc.

Any ideas? The problem is getting a window handle of the target application, which may never be the same, focusing it and then pasting.


You may can try with send keys "CTRL + V" to the other application? Anyway, get external application handles or send keys to it is out of npClip plugin scope in my honest opinion.

PostPosted: Fri Jun 22, 2012 1:35 pm
by Wrangler
Thanks for the reply, Dec.

I've tried that. The problem is once you focus the target application to paste, sendkeys won't work because the nb app loses the focus.

I figured npclip wouldn't do that, but thought maybe someone knew how to make this work, either using another plugin or with some other sort of scripting.

PostPosted: Fri Jun 22, 2012 1:37 pm
by dec
Hi,

I can't imagine (of course my imagination is really very poor) what you can in fact to do. So, you can paste content to other application... if is open? And what if not? And what if the application have content? Maybe loss them... so maybe the way is not found a possible solution, but a possible workaround to do what you wanted. I don't know... maybe I can't imagine very well what you wanted to do exactly and maybe more important: why on this way?

PostPosted: Fri Jun 22, 2012 1:48 pm
by HPW
You may have a look at hpwSendKeys.

PostPosted: Fri Jun 22, 2012 1:51 pm
by Wrangler
I did look at it, Hans, but didn't see an action that grabs the handle or window title of the target application. Am I missing something?

PostPosted: Fri Jun 22, 2012 1:54 pm
by HPW
hpwSendKeysToTitle or hpwFindAWindow/hpwSendKeysToHandle should help.

PostPosted: Fri Jun 22, 2012 1:57 pm
by Wrangler
hpwFindAWindow:

What would I enter for 'Part of window caption' if the handle or title is unknown?

PostPosted: Fri Jun 22, 2012 2:02 pm
by HPW
It will find it as long as the string is part of the caption.
Problem could only be more than one matching window.

Sorry to be off topic to this thread.