天天看点

Useful all-purpose LotusScript classes

Here are some LotusScript classes that I have written. Put them in a script

library and add a "Use" statement to the options section of your code. Or simply

copy the code into the "Declarations" section. There is an explanation of how to

use the classes at the top of each file.

BinarySearchTree

This data structure can be used to find max and min values of

a collection, to sort a collection or to eliminate doubles.

ClipBoard

ClipBoard represents the Win32 clipboard. It allows you to

copy data between the clipboard and your application.

Exporter

A class for exporting fields or documents to file. For

instance, you can use it to export a Notes document to an RTF file.

FileReaper

This is a class for cleaning up after applications that

create temporary files. It deletes files based on file masks.

IniFile

A class for working with Windows ini files.

NetworkConnection

This class is used in agents that run on the server (where

the server runs as an NT service). It gives the agent access to network

shares.

NotesAuthorization

This is a trivial wrapper around the NotesAuthorization

class.

PersistantFileDialog

This class displays a file dialog. It 'remembers' where the

user was last time.

RedBlackTree

An abstract data structure that provides an ordered

collection without doubles. You can use this class to eliminate doubles, or for

searching and sorting.

Registry

This class lets you retrieve values from your Windows

registry. There are convenience methods like

'getShellBinary(extension).'

ScreenResolution

This class provides information about the screen resolution

of the client machine.

ShellCommand

This class is used for executing external applications. As

opposed to the Shell function, this class waits for execution to finish before

it returns. It also (optionally) completely hides the external application from

the user.

StringSet

A collection that contains no duplicate elements. You can use

this data structure to eliminate doubles.

StringTokenizer

Splits strings into tokens. Useful for instance if you want

to get at the words separated by commas in a list.

WordCleaner

This class is used to manipulate a MicroSoft Word document

before importing it into a Notes database. Since there are some Word features

that the Notes import filter can't handle properly, your document will look

better if you prepare the doucment with this class before importing it.