TEAM ENVI^ ENVIMODE=1| ENVI^ FORCELOCAL=1
SET MMOVE=SEND -m 0x8001;
SET MLDOWN=SEND -m 0x8002
SET MLUP=SEND -m 0x8004
SCRN ScrW,ScrH 
//注意屏幕的逻辑高和宽均为0xFFFF,要转换
WIN1

_SUB WIN1,L100W300H222,鼠标模拟
    ITEM ITEM1,L50T40W60H30,ITEM1,MESS-bg 111,
    ITEM ITEM2,L150T40W60H30,ITEM2,
    LABE -vcenter LABE1,L47T122W168H30,LABE1,,
    ENVI @ITEM1.POS=?@X1:Y1
    CALC X1=%X1% + 30
    CALC Y1=%Y1% + 15
    CALC #X=%X1%*0xFFFF/%ScrW%  //屏幕坐标转逻辑坐标
    CALC #Y=%Y1%*0xFFFF/%ScrH%
    ENVI @this.Visable=1
    WAIT 3000
    ENVI @LABE1=移到按钮1上
    %MMOVE% %X%;%Y%
    WAIT 3000
    ENVI @LABE1=左键按下
    %MMOVE% %X%;%Y%
    %MLDOWN%
    WAIT 3000
    ENVI @LABE1=左键弹起
    %MMOVE% %X%;%Y%
    %MLUP%
    WAIT 3000
    ENVI @LABE1=演示完毕 
_END
 

