This example checks to see if the name of the window the user is currently working with is ôUntitled û Notepad.ö If not, the task disables itself.
Sub Main
If Action2.GetFocusedWindowName <> ôUntitled û Notepadö Then
Action2.DisableThisTask
End If
End Sub