Copy one 'agent' and one 'script' from one database to another

Could you help me write a piece of code that would automate and copy one 'agent' and one 'script' from one database to another? Any help would be appreciated.
I remember seeing an article, I believe it was in The View, where $FormulaClass of a view was modified so you could see design elements in a view and gather certain information from them. Basically, you can programmatically copy the design elements from one Notes DB to another if you know the document ID. You can find more information on the $Formula class from Dan Velesco's Domino Power article and from Julian's NSFTools tips page.

Although I know the article Manage Notes design elements with LotusScript is not the original article, it also contains information on accessing design elements using the DocID or NoteID.

Do you have comments on this Ask the Expert question and response? Let us know.

This was first published in March 2005