Kenneth Haggman - ReOrder agents - Scripts - DLL - API ($ScriptLib)

Hi,

I’m using the db of Kenneth Haggman, found on eview, to reorder my script libraries. It’s working very well but it only sort script libraries.

I would like to sort scripted agents. I have 16 dbs in a system with more than 120 agents.

I’ve modified the code to reference the right type of design elements, agentDocuments, from the dbDesign class of Damian Katz.

The code fail with the following error:

Error 1000, “Error retrieving first item info”

Set docDesign = dbDesign.getAgentByName(doc.ScriptLibrary(0))

	'-- Use API to get first instance of the item.

	iStatus = W32_NSFItemInfo (docDesign.handle, ITEM_SCRIPTLIB, Len(ITEM_SCRIPTLIB), item_blockid, value_datatype, value_blockid, value_len)

	If iStatus <> NOERROR Then

		Error 1000, "Error retrieving first item info." & Me.strLF & Me.GetCAPIErrorMsg(iStatus)

	End If

My problem seems to be here : ITEM_SCRIPTLIB

In the db from Kenneth, it reference : const ITEM_SCRIPTLIB = {$ScriptLib}

This is an item found in a script library. It contains all the scripted code in a text format. I’m trying to find the equivalent for a scripted agent but it doesn’t seems to have it.

Any ideas? Do I have to export into DXl or something like that?

I’ve found something about sorting in DXL

http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/4dda60ff86cd872a85257059002883a0?OpenDocument&Highlight=0,sort,dxl,script

but it throws an error : DXL importer operation failed. I’m not very familiar with DXL . I didn’t find anything about the GetLog.

thank you,

JYR

Subject: Kenneth Haggman - ReOrder agents - Scripts - DLL - API ($ScriptLib)

LotusScript agents store their source code in an item called $AssistAction which is of type Agent Action.

Script Libs, on the other hand store, their source code in an item called $ScriptLib which is of type Text.

Not sure if that helps…

Frunobulax

Subject: Kenneth Haggman - ReOrder agents - Scripts - DLL - API ($ScriptLib)

Ok, i was able to get it to work, but it doesn’t sort. It’s only doing a output file.

JYR

Subject: RE: Kenneth Haggman - ReOrder agents - Scripts - DLL - API ($ScriptLib)

Hi Mr Frunobulax,

Well i know those items. They can be seen in NotesPeek but they are not display as a Text format…unfortunatly :-/

Thank you for taking time to answer,

JYR