次のスクリプトは現在のエージェントの実行時期を確認し、表示します。Dim session As New NotesSession
Dim agent As NotesAgent
Dim db As NotesDatabase
Set agent = session.CurrentAgent
triggerDoc = agent.Trigger
Select Case triggerDoc
Case TRIGGER_NONE : triggerDoc = _
"This agent doesn't have a schedule."
Case TRIGGER_SCHEDULED : triggerDoc = _
"This agent runs when it is scheduled."
Case TRIGGER_AFTER_MAIL_DELIVERY : triggerDoc = _
"This agent runs after there is new mail."
Case TRIGGER_MANUAL : triggerDoc = "This agent runs manually."
Case TRIGGER_DOC_PASTED : triggerDoc = _
"This agent runs when documents have been pasted."
Case TRIGGER_DOC_UPDATE : triggerDoc = _
"This agent runs if documents have been updated."
Case TRIGGER_BEFORE_MAIL_DELIVERY : triggerDoc = _
"This agent runs before new mail."
Case TRIGGER_SERVERSTART : triggerDoc = _
"This agent runs when the Domino server starts."
End Select
Messagebox triggerDoc