EXEC "%&MyName%" LOAD "%&CurFile%"*AutoCap 3000  1000

// AutoCap 间隔(ms)[=3000]  最大次数[=无限]
_SUB AutoCap
    ENVI^  ForceLocal=1
    @TEAM SET &INT=%~1| SET &Limit=%~2| SET &ID=0| CALC Limit=%Limit%|  CALC INT=%INT%|  IFEX $%INT%<1000, SET INT=3000
    LOOP #1=1,
    {   CALC #ID=%ID% + 1
        //IFEX $%ID%<1000, RSTR  &&IDX=5,000000%ID%! SET &IDX=%ID%  //序号
        DATE *space0 &&CurTime
        MSTR &&YY,&&MM,&&DD,&&HH,&&MU,&&SE=<1*>%&CurTime%
        SET &IDX=%YY%%MM%%DD%%HH%%MU%%SE%    //时间
        SCRN -cap C:\PECMD%IDX%.png,0:0
        IFEX $[ %Limit%>0 & %Limit%<=%ID% ], EXIT 
        WAIT %INT%
    }
_END
