npNots plugin

About this plugin

This plugin monitors shell changes and notifies your publication. This include files and folders being modified, created, renamed, or deleted, drives being added or removed, media being inserted or removed from removable media drives, and more.

You can create one or more object instances. You can active and deactive every instance separatelly, specify the folder to watch, watch subfolders, specify a maximum numbers of notifications and have dozens of shareable events/subroutines.

Thirparty

This plugin are imposible without the aid of this people:

Thanks a lot!

Plugin actions index

npNotsCreate

Create a new instance of an Nots object. The result variable store the object ID for the created object. You need to use this ID on other plugin actions.

↑↑

npNotsDestroy

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

↑↑

npNotsDestroyAll

Destroy all previously created instances of Nots objects.

↑↑

npNotsOptions

Set the options for a new Nots object instance. Below you can read the description for every available options:

The result variable store "True" if everything is OK, or "False" if an error ocurr. On this last case the variable [LastError] store information about the error.

↑↑

npNotsEvents

Set the events to watch for a new Nots object instance. Determines the shell events that will be monitored. If you are only interested in receiving notification on specific events, only set those events "True" from this action. If, for example, you are only interested in knowing when media is inserted or removed from removable media devices, set to "True" "MediaInsert" and "MediaRemove". The result variable store "True" if everything is OK, or "False" if an error ocurr. On this last case the variable [LastError] store information about the error.

↑↑

npOnNotsAssociationChange

Defines an subroutine that is called when a file association changes. This event is fired when a file association changes. No meaningful information is available from the shell regarding file association changes.

The Instance ID variable store the Nots object instance who fire this event. The result variable store "True" if everything is OK, or "False" if an error ocurr. On this last case the variable [LastError] store information about the error.

↑↑

npOnNotsAttributeChange

Defines an subroutine that is called when a file's attributes change. In theory, this event is fired when the attributes of a file in the watched folder change. In most cases, however, an File Change Event occurs instead.

The Instance ID variable store the Nots object instance who fire this event. The result variable store "True" if everything is OK, or "False" if an error ocurr. On this last case the variable [LastError] store information about the error.

↑↑

npOnNotsFileChange

Defines an subroutine that is called when a file in the watched folder changes. This event is fired when a file in the watched folder changes. This event is usually generated when the attributes of a file change. Contrary to what you might expect, it is not typically generated when a file is modified and saved by an external program. The Item variable store the path of the file.

The Instance ID variable store the Nots object instance who fire this event. The result variable store "True" if everything is OK, or "False" if an error ocurr. On this last case the variable [LastError] store information about the error.

↑↑

npOnNotsFileCreate

Defines an subroutine that is called when a file in the watched folder is created. This event is fired when the shell creates a file in the watched folder. This event will not be fired when an external program creates a file in the watched folder. This event will, however, be generated when a file is added to the folder by the shell (such as the result of a paste operation or a file move). The Item variable store the path of the file.

The Instance ID variable store the Nots object instance who fire this event. The result variable store "True" if everything is OK, or "False" if an error ocurr. On this last case the variable [LastError] store information about the error.

↑↑

npOnNotsFileDelete

Defines an subroutine that is called when a file in the watched folder is deleted. This event is fired when the shell deletes a file in the watched folder. The Old Item variable store the file path before it is deleted. The New Item variable store the file path after it is deleted (this var can be empty in some cases). Files that are sent to the Recycle Bin may not result in this event being generated on all operating systems. In some cases an Rename File event is generated instead. This event is not generated when a file is programmatically deleted. The event will only be generated when a file is deleted using the shell.

The Instance ID variable store the Nots object instance who fire this event. The result variable store "True" if everything is OK, or "False" if an error ocurr. On this last case the variable [LastError] store information about the error.

↑↑

npOnNotsFileRename

Defines an subroutine that is called when a file in the watched folder is renamed. This event is fired when the shell renames a file in the watched folder. The event will be generated when a file is renamed using the shell. Consider the case where a file called Test.txt is renamed to MyFile.txt. In that case the Old item variable will be "Test.txt" and the New Item variable will be "MyFile.txt."

The Instance ID variable store the Nots object instance who fire this event. The result variable store "True" if everything is OK, or "False" if an error ocurr. On this last case the variable [LastError] store information about the error.

↑↑

npOnNotsDriveAdd

Defines an subroutine that is called when a drive is added to the system. This event is fired when a drive is added to the system. This event usually occurs when a network drive is mapped. The Item variable store the path of the drive added.

The Instance ID variable store the Nots object instance who fire this event. The result variable store "True" if everything is OK, or "False" if an error ocurr. On this last case the variable [LastError] store information about the error.

↑↑

npOnNotsDriveRemove

Defines an subroutine that is called when a drive is removed from the system. This event is fired when a drive is removed from the system. This event usually occurs when a network drive is disconnected. The Item variable store the path of the removed drive.

The Instance ID variable store the Nots object instance who fire this event. The result variable store "True" if everything is OK, or "False" if an error ocurr. On this last case the variable [LastError] store information about the error.

↑↑

npOnNotsShellDriveAdd

Defines an subroutine that is called when a drive is added by the shell GUI. The Item variable store the path of the drive added. The Instance ID variable store the Nots object instance who fire this event. The result variable store "True" if everything is OK, or "False" if an error ocurr. On this last case the variable [LastError] store information about the error.

↑↑

npOnNotsDriveSpaceChange

Defines an subroutine that is called when a drive space change event is fired. The Drives variable store a NeoBook Array (zero indexed) with the letter of drives which are changed. The Drives Count variable store the number of items on the mentioned Array. The result variable store "True" if everything is OK, or "False" if an error ocurr. On this last case the variable [LastError] store information about the error.

↑↑

npOnNotsMediaInsert

Defines an subroutine that is called when media is inserted into a removable media device. If, for example, media was inserted into a CD-ROM on the D: drive, the Item variable store "D:\". This event is not generated when a diskette is inserted into a floppy drive. This event is usually accompanied by an Image List Change event.

The Instance ID variable store the Nots object instance who fire this event. The result variable store "True" if everything is OK, or "False" if an error ocurr. On this last case the variable [LastError] store information about the error.

↑↑

npOnNotsMediaRemove

Defines an subroutine that is called when media is removed from a removable media device. If, for example, a CD was removed from a CD-ROM on the D: drive, the Item variable store "D:\". This event is not generated when a diskette is removed from a floppy drive. This event is usually accompanied by an Image List Change event.

The Instance ID variable store the Nots object instance who fire this event. The result variable store "True" if everything is OK, or "False" if an error ocurr. On this last case the variable [LastError] store information about the error.

↑↑

npOnNotsFolderChange

Defines an subroutine that is called when the watched folder changes. This event is fired when the watched folder changes. The Item variable store the folder path. This event is generated when the folders drive space changes (as the result of a file or folder being created, deleted, or modified) or when the folders attributes change.

The Instance ID variable store the Nots object instance who fire this event. The result variable store "True" if everything is OK, or "False" if an error ocurr. On this last case the variable [LastError] store information about the error.

↑↑

npOnNotsFolderCreate

Defines an subroutine that is called when a new folder in the watched folder is created. This event handler is fired when the shell creates a folder in the watched folder. This event is not fired when an external program creates a folder. This event is, however, generated when a folder is created by the shell (such as the result of a paste operation or a file move). The Item variable store the path of the created folder.

The Instance ID variable store the Nots object instance who fire this event. The result variable store "True" if everything is OK, or "False" if an error ocurr. On this last case the variable [LastError] store information about the error.

↑↑

npOnNotsFolderDelete

Defines an subroutine that is called when a folder in the watched folder is deleted. This event is fired when the shell deletes a folder in the watched folder. Unlike files sent to the Recycle Bin, folders that are deleted to the Recycle Bin result in this event rather than an Folder Rename event on all operating systems. This event is not generated when a file is programmatically deleted unless the folder is deleted using the shell (such as when a folder is deleted through Windows Explorer).

The Instance ID variable store the Nots object instance who fire this event. The result variable store "True" if everything is OK, or "False" if an error ocurr. On this last case the variable [LastError] store information about the error.

↑↑

npOnNotsFolderRename

Defines an subroutine that is called when a folder in the watched folder is renamed. The Old Item variable store the folder path before it is renamed, and New Item variable store the folder path after it is renamed. The event is generated when a file is renamed using the shell.

The Instance ID variable store the Nots object instance who fire this event. The result variable store "True" if everything is OK, or "False" if an error ocurr. On this last case the variable [LastError] store information about the error.

↑↑

npOnNotsNetShare

Defines an subroutine that is called when a folder or drive is shared. If, for example, the E: drive is being shared, the Item variable is "E:\". On Windows NT this event is generated when a folder is shared and when a folder is unshared.

The Instance ID variable store the Nots object instance who fire this event. The result variable store "True" if everything is OK, or "False" if an error ocurr. On this last case the variable [LastError] store information about the error.

↑↑

npOnNotsNetUnShare

Defines an subroutine that is called when a folder or drive is unshared. If, for example, the E: drive is being unshared, the Item variable is "E:\". On Windows NT this event is never generated. Instead, the Net Share event is generated when the folder is unshared.

The Instance ID variable store the Nots object instance who fire this event. The result variable store "True" if everything is OK, or "False" if an error ocurr. On this last case the variable [LastError] store information about the error.

↑↑

npOnNotsServerDisconnect

Defines an subroutine that is called when a remote machine disconnects from a network. The Item variable store the drive path that is being disconnected. The Instance ID variable store the Nots object instance who fire this event. The result variable store "True" if everything is OK, or "False" if an error ocurr. On this last case the variable [LastError] store information about the error.

↑↑

npOnNotsImageListChange

Defines an subroutine that is called when an image in the system image list changes. This event is fired when an image in the system image list changes. Usually this event occurs as the result of a CD being inserted into a CD-ROM drive. No meaningful information is available from the shell regarding image list changes.

The Instance ID variable store the Nots object instance who fire this event. The result variable store "True" if everything is OK, or "False" if an error ocurr. On this last case the variable [LastError] store information about the error.

↑↑

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.

↑↑