Правильнее писать не $E=$E+1 а INC($E,1)
Да отсутствует GETSCREEN
LOGWRITE("начало")
LCLICK(471,284)
WAIT(1)
LCLICK(643,32)
WAIT(1)
DEFINE ($varA)
LOGWRITE("1:",$varA)
DEFINE ($varB)
LOGWRITE("2:",$varB)
DEFINE ($varC)
LOGWRITE("3:",$varC)
DEFINE ($varD)
LOGWRITE("4:",$varD)
RCLICK(1133,100)
RCLICK(1133,100)
RCLICK(1133,100)
RCLICK(1133,100)
WAITMS(70)
LCLICK(928,183)
LCLICK(928,183)
LCLICK(928,183)
WAIT(4)
$E=0
KEYDOWN(#SHIFT)
LCLICK(1133,100)
KEYUP(#SHIFT)
KEYDown(#ENTER)
WAIT(2)
KEYUP(#ENTER)
LCLICK(102,682)
WAIT(1)
GETSCREEN
$varA=PXLCOUNT(355,302,512,320,13435032)
LOGWRITE("1:",$varA)
$varB=PXLCOUNT(355,321,512,340,13435032)
LOGWRITE("2:",$varB)
$varC=PXLCOUNT(355,341,512,358,13435032)
LOGWRITE("3:",$varC)
$varD=PXLCOUNT(355,359,512,378,13435032)
LOGWRITE("4:",$varD)
IF(($varA=87)|($varA=90))
INC($E,1)
END_IF
IF(($varB=87)|($varB=90))
INC($E,1)
END_IF
IF(($varC=87)|($varC=90))
INC($E,1)
END_IF
IF(($varD=87)|($varD=90))
INC($E,1)
END_IF
LOGWRITE($E)
IF($E>0)
LOGWRITE("Готово")
halt
END_IF
WAIT(2)
LOGWRITE("проход")
UNDEFINE ($varA)
LOGWRITE("1:",$varA)
UNDEFINE ($varB)
LOGWRITE("2:",$varB)
UNDEFINE ($varC)
LOGWRITE("3:",$varC)
UNDEFINE ($varD)
LOGWRITE("4:",$varD)