|
将抓图的脚本改成了这个样子:
- ENVI^ ForceLocal=1
- LOGS * X.LOG
- SET &capd=%DeskTop%
- SET &fn=屏幕捕获
- SET &wid=0
- set &ext=PNG
- CALL @WIN1
- _SUB WIN1,W449H220,截图,
- LABE LABE1,L10T42W60H20,延时(秒):,,
- EDIT Delay,L72T40W40H20,0,,
- SPIN SPIN1,L114T39W18H22,:1:99,,0x80,0x80
- LABE LABE2,L170T42W40H20,对象:,,
- EDIT wWid,L212T40W30H20,%wid%,,
- LABE LABE3,L280T42W60H20,保存类型:,,
- LIST lEXT,L342T40W60H20,PNG|BMP|JPG|GIF|TIFF,ENVI @wFN=%&capd%\%fn%.%lEXT%,%ext%
- LABE -VCENTER LABE4,L10T90W90H30,保存位置及文件,,
- EDIT -VCENTER -3D wFN,L105T90W300H30,%&capd%\%fn%.%ext%,NAME fn=%wFN%,
- ITEM ITEM2,L410T89W21H30,>>,OnBrow,
- ITEM ITEM1,L191T141W60H30,抓图, OnDo,
- _END
- _SUB OnBrow
- BROW &&capdir,*%capd%,选择一个文件夹
- FIND $%capdir%=, EXIT
- TEAM ENVI &capd=%capdir%|ENVI @wFN=%&capd%\%fn%.%ext%
- _END
- _SUB OnDo
- SET &wid=%wWid%
- SET &afn=%wFN%
- FIND $%afn%=, EXIT
- ENVI @this.visable=0
- CALC &&ms=%Delay%
- CALC &ms=%&ms% * 1000#0
- IFEX $%ms%<0, SET ms=0
- CALC #&ms=%&ms% + 10
- WAIT %&ms%
- SCRN -cap %afn%,%wid%
- WAIT 10
- ENVI @this.visable=1
- _END
复制代码
只选择保存位置,文件名自己输入、默认桌面、类型自选 |
|