Below Is a very simple LotusScript code function that assumes that there is only one parameter such that the url is something like "http://domain.com/path/database.nsf/pathtoMyAgent/MyAgent?OpenAgent123", where 123 is the parameter value you are looking for
Function ExtractPassedParameter As String
'========================================================
' This routine parses parameters sent to the agent in the
' command line. to the right of the &
'========================================================
Dim paramdoc As NotesDocument
Dim pathinfo, param As String
Dim eq As Integer
Set paramdoc = ses.documentcontext
pathinfo = paramdoc.PATH_INFO(0)
eq = Instr(pathinfo,"&")
If eq = 0 Then
ExtractPassedParameter = ""
Exit Function
End If
' discard every before the first &
param = Right(pathinfo,Len(pathinfo)-eq)
ExtractPassedParameter = Ucase$(param)
End Function
This is old code, I’ve used for a looong time (maybe back in the EVI days?) . I don’t know If I wrote it or stole it from someone smarter than me.