The following example deletes the second step of the currently running task (note that, since AutoMate uses a zero based index for steps, step two in the step builder is actually index 1 in the scripting language).
Sub Main
CurrentTask2.DeleteTaskStep (2)
MsgBox 鉄tep 2 deleted.
End Sub