Skip to content

SCRIPTCONTEXTDESCR

Data Type : Agents
SCRIPTCONTEXTDESCR - Structure for passing LotusScript context information.

#include <agents.h>

Definition :

typedef struct {
    DWORD Length;
    char  szNameOfContextClass[MAXIMUM_ID_NAME_LENGTH + 1];
}SCRIPTCONTEXTDESCR;

Description :

This structure is used to pass the LotusScript context information to the AgentLSTextFormat API. Following are the name of the context class assigned for each LotusScript context:

If the LotusScript was contained in: Specify the following text as "szNameOfContextClass":
FormNOTESUIDOCUMENT
PageNOTESUIDOCUMENT
SubformNOTESUIDOCUMENT
ViewNOTESUIVIEW
ActionBUTTON
FieldFIELD
Database ScriptNOTESUIDATABASE

Sample Usage :

Here is the code snippet for filling up the SCRIPTCONTEXTDESCR structure if a 
LotusScript was contained in a button:


     SCRIPTCONTEXTDESCR * pSCD;
            HANDLE hData = NULLHANDLE;

           error = OSMemAlloc(0,sizeof(SCRIPTCONTEXTDESCR),&hData);
           pSCD = OSLock(SCRIPTCONTEXTDESCR,hData);

           pSCD->Length = sizeof(SCRIPTCONTEXTDESCR);
           strcpy(pSCD->szNameOfContextClass, "BUTTON" );

           OSUnlock( hData);

           AgentLSTextFormat( hSrc, &hDest, &hErrs, dwFlags, &hData ); 

See Also : AgentLSTextFormat