The following example sets the current task to trigger only when the window with the title of 填ntitled Notepad appears.
Sub Main
' Turn on the 展indow Watcher trigger
CurrentTask2.TaskTriggers = 4
' Set the only property of the 展indow Watcher
CurrentTask2.WindowName = 填ntitled Notepad
End Sub