Так:
IF(ISKEYDOWN(1)=1)
IF(($_xmouse > 2366) & ($_xmouse < 3390) & ($_ymouse > 110) & ($_ymouse < 945))
LCLICK(RND(100,350),RND(20,150))
WAITMS(500)
GETSCREEN(1920,0,3839,1079)
IF_PICTURE_IN (1920,0, $_xmax,$_ymax, "img\resurs.bmp")
LCLICK($_return1+(RND(120,180)), $_return2+(RND(1,5))
WAITMS(100)
END_IF
WHILE(ISKEYDOWN(1)=1)
WAITMS(50)
END_CYC
END_IF
END_IF
WAITMS(50)
Или так:
WHILE(ISKEYDOWN(1)=0)
WAITMS(50)
END_CYC
IF(($_xmouse > 2366) & ($_xmouse < 3390) & ($_ymouse > 110) & ($_ymouse < 945))
LCLICK(RND(100,350),RND(20,150))
WAITMS(500)
GETSCREEN(1920,0,3839,1079)
IF_PICTURE_IN (1920,0, $_xmax,$_ymax, "img\resurs.bmp")
LCLICK($_return1+(RND(120,180)), $_return2+(RND(1,5))
WAITMS(100)
END_IF
END_IF
WHILE(ISKEYDOWN(1)=1)
WAITMS(50)
END_CYC