npClip plugin

About this plugin

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.

Thirparty

This plugin are imposible without the aid of this people:

Thanks a lot!

Plugin actions index

npClipCreate

Create a new instance of an Clip object. The result variable store the instance "ID" number that you can use with other plugin actions.

↑↑

npClipDestroy

Destroy a previously created instanace of an Clip object. The result variable store "True" if everything is OK, or "False" if an error occur. In this last case the [LastError] variable store information about the error.

↑↑

npClipDestroyAll

Destroy all previously created instances of Clip objects.

↑↑

npClipCut

Cut from the clipboard content by the specified format. This action is like npClipCopy but next to copy the clipboard content the plugin clear the clipboard. See the refered action for more details.

↑↑

npClipCopy

Copy from the clipboard content by the specified format. This action copy the content of the clipboard to the result variable if even that the clipboard content format is the same that the specified format. In other case the result variable store an empty string. The result variable can also store "False" if an error occur. In this last case the [LastError] variable store information about the error.

↑↑

npClipPaste

Paste to the clipboard content by the specified format. Use this action in order to paste content to the clipboard in the specified format. If the specified format is not previously registered, this action register it before paste the specified content. The result variable store "True" if everything is OK, or "False" if an error occur. In this last case the [LastError] variable store information about the error.

↑↑

npClipIsFormat

Find if a clipboard format has been previously registered. The result variable store "True" if the specified clipboard format has been previously registered, or "False" when not. The result variable can also store "False" if an error occur. In this last case the [LastError] variable store information about the error.

↑↑

npClipHasFormat

Find if the clipboard content is in the specified format. The result variable store "True" if the content of the clipboard is in the specified format, or "False" when not. The result variable can also store "False" if an error occur. In this last case the [LastError] variable store information about the error.

↑↑

npClipRegFormat

Register a clipboard format in order to be available to use. The result variable store "True" if everything is OK, or "False" if an error occur. In this last case the [LastError] variable store information about the error.

↑↑

npClipUnregFormat

Unregister a clipboard format previously registered. The result variable store "True" if everything is OK, or "False" if an error occur. In this last case the [LastError] variable store information about the error.

↑↑

npClipHasImage

Find if the current Clipboard content have some image data. The result variable store "True" if the Clipboard has image data or "False" when not.

↑↑

npClipGetImage

Save the current Clipboard image content to your desired bitmap file. Specify the bitmap file path to save the Clipboard image. The result variable store "True" if everything is OK, or "False" in caes of errors. In this last case the [LastError] variable store information about the error.

↑↑

npClipSetImage

Set the current Clipboard image content from your desired bitmap file. Specify the bitmap file path to put into the Clipboard. The result variable store "True" if everything is OK, or "False" in caes of errors. In this last case the [LastError] variable store information about the error.

↑↑

npOnClipChange

Set a publication subroutine to be executed when the specified Clip object instance clipboard content change. The Instance ID variable store the ID of the Clip object that fire the event. Note this event is executed ever that the clipboard changed, not only when store content with your own formats, but in any case. You can use the npClipHasFormat action to find if the clipboard store content in the specified format.

↑↑

Action errors subroutine

All the NeoPlugins deal with errors in the same way that NeoBook does: when the plugin found an action error the [LastError] variable store information about the error, so you can take care about this variable when execute an action.

But all the NeoPlugins also incorporate an advanced way to deal with possible action errors. You can define a subroutine named OnNeoPluginActionError in order to be executed when some action error are found and you can use this variables inside:

Note that this error handling subroutine are shared for all the NeoPlugins, so you no need to specify a subroutine for every plugin you use in your publication because the same subroutine are recognized and automagically used by every NeoPlugin. Below you can view a sample of this subroutine code:

:OnNeoPluginActionError
  AlertBox "NeoPlugin Error" "Error [LastError] in plugin: [PluginName]"
Return

Also note that the use of this NeoPlugins error handling subroutine is completelly optional. You can continue using the [LastError] variable as usual and even use the both methods at the same time.

↑↑