$key = 1
IF(ISKEYDOWN($key) = 1)
IF($active1 = 0)
SETTHREAD (name1,1) // 0 - Пауза, 1 - Старт, 2 - Стоп
SETTHREAD (name2,2)
$active1=1
$active2=0
END_IF
ELSE
IF($active2 = 0)
SETTHREAD (name2,1)
SETTHREAD (name1,2)
$active2=1
$active1=0
END_IF
END_IF
WAITMS(20)
THREAD(name1, 0)
RDOWN($_xmouse, $_ymouse)
WAITMS(RND(250,350))
MDOWN($_xmouse, $_ymouse)
WAITMS(20)
END_THREAD
THREAD(name2, 0)
RUP($_xmouse, $_ymouse)
MUP($_xmouse, $_ymouse)
WAITMS(20)
END_THREAD