Stampa
Categoria: Lotus Notes
Visite: 4452
Stella inattivaStella inattivaStella inattivaStella inattivaStella inattiva
 

 List of useful snippes for Lotus Script, the main language used in Lotus Notes / Domino.

 

Send Console Command

Dim se as new notessession
Dim sCmd As String

sCmd = |tell amgr run “%1″ ‘%2′|
sCmd = Replace(sCmd, “%1″, “databasePath\file.nsf”)
sCmd = Replace(sCmd, “%2″, “agentName”)
Call se.SendConsoleCommand(“yourServerName”, sCmd)

 

 

Time Elapsed

Sub Click(Source As Button)
	Dim ndtTime1 As New NotesDateTime("")		
	Dim ndtTime2 As New NotesDateTime("")
	
	Call ndtTime1.SetNow
	For x=1 To 13000
		Print x
	Next
	
	Call ndtTime2.SetNow
	
	Dim lngTimeDiff As Long 
	Dim intMinutes As Integer 
	
	intMinutes=1
	lngTimeDiff=ndtTime2.TimeDifference(ndtTime1) 	
	
	Print   ndtTime2.TIMEONLY & " - " & ndtTime1.TIMEONLY & " = " & lngTimeDiff
End Sub