DesktopX 3.0 supports scriptable plugins that simply add some custom
functionality. In the case of the Scriptable Mail Notify plugin, only the actual
email check functionality is offered by the plugin, while the account
management, the preferences, the configuration and everything else is left to
the DesktopX author to be implemented with DesktopX objects and scripts.
In order to use this plugin, you should add both a script and the “Scriptable
Mail notify” plugin to an object.
The plugin exposes only one method and one notification event.
The method is:
requestID is a string identifying the request. Since this method is
asynchronous and returns immediately, if you are handling multiple accounts you
need to match responses with requests. This value let you do that, since you get
back the same identifier when the response is ready.
sLogin is the mail account user name, sPass is the password, sSever is the
server name (i.e. “mail.stardock.com”).
AccountType can be 0 for POP3 or 1 for IMAP.
Use the event wizard to get the following event added to the script:
Sub Mail_OnMailEvent(requestID, newMails)
This event will be fired when a request has been accomplished. RequestID
contains the identifier passed in the request and newMails is a number
indicating the unread mails.