The following example sets the current task to trigger only when the spooler changes (i.e., when a print job is added, removed or completed from the printer queue) or the system date/time changes
Sub Main
' Set the task to trigger on only Windows Events
CurrentTask2.TaskTriggers = 2
' Set the window events to spooler or time change
CurrentTask2.Events = 33
End Sub