DisableThisTask Example

 

This example checks to see if the name of the window the user is currently working with is 填ntitled Notepad. If not, the task disables itself.

 

Sub Main

 If Action2.GetFocusedWindowName <> 填ntitled Notepad Then

  Action2.DisableThisTask

 End If

End Sub