mshta给批处理脚本开辟了丰富的网页GUI资源,cmd+mshta混编脚本令此道更加便捷。现给一个简版示例如下(存为批处理脚本文件*.cmd)。- <!-- :
- @echo off
- for /f "delims=" %%v in ('mshta "%~f0"') do (echo,%%v)
- pause&exit/b
- -->
- <meta http-equiv='x-ua-compatible' content='ie=11'>
- <script>window.resizeTo(420, 160);</script>
- <br><input type='text' id='ti' size=28 placeholder='请输入' />
- <input type=button value='确认' onclick=getInput() /><br>
- <script>
- function getInput () {
- if (ti.value) new ActiveXObject('scripting.filesystemobject').getstandardstream(1).write(ti.value);
- close();
- }
- </script>
复制代码
|