本帖最后由 cjiabing 于 2012-6-8 16:05 编辑
十分不错,通俗易懂!~
来个演示!~- @echo off
-
- :Start
- cls
- echo;
- echo;十一月的肖邦 - 周杰伦 【播放】[点击开始播放]
- echo;
-
- call :Mouse
- for /l %%a in (28,1,31) do if "%x%,%y%"=="%%a,1" goto Player
-
- pause&exit
-
-
- :Player
- echo 正在联网播放……
- start /min "" wmplayer.exe "http://news.bjsjs.gov.cn/jxbbs/images/upload/2005/11/25/100905.mp3"
- echo;
- echo 【停止】[点击停止播放]
- call :Mouse
- for /l %%a in (3,1,5) do if "%x%,%y%"=="%%a,6" taskkill /f /t /im wmplayer.exe&goto Start
- taskkill /f /t /im wmplayer.exe
- exit
-
-
- :Mouse
- mouse
- set /a ret=%errorlevel%
- set /a x="%ret%>>16"
- set /a y="%ret%&65535"
- echo;
- echo 单击时鼠标位于坐标:%x%,%y%
- echo;
- goto :eof
复制代码
|