本帖最后由 pcl_test 于 2015-9-16 23:21 编辑
- @echo off
- ::调用有道翻译API,需联网
- set word=hello world
- if not exist "%tmp%\$.vbs" (
- >"%tmp%\$.vbs" echo;set wmp=CreateObject("WMPlayer.ocx"^):wmp.url="http://dict.youdao.com/dictvoice?audio="^&WScript.Arguments(0^)^&"":Do until wmp.playState=1:wscript.Sleep 100:Loop:wscript.quit
- )
- cscript /nologo "%tmp%\$.vbs" "%word%"
- pause
复制代码
|