这个 Windows 脚本(wsf格式),是我在CMD里面用来在线听歌的,资源搜索服务由Google音乐提供(实际上是盗用。。。),得到的音乐和歌词资源好像都是巨鲸音乐提供的,质量不错,最重要的是,我发现链接速度是飞快地!!!
试想一下,打开一个黑乎乎的窗口敲命令,在外人眼中本来就是一种很屌的行为,而且,你只输入“知了也睡了”,就听见电脑开始播放梁静茹的宁夏,那个黑不啦叽的窗口居然也跟着音乐显示歌词,这就更屌了啊!实际上还支持同时下载歌词和歌曲,简直就是全能了。
你可以直接双击它用默认的wscript.exe运行,但这样不接受任何参数,只能按我指定的方式运行:使用 wmplayer 播放,只能保持歌词;
而在控制台中用 cscript.exe 运行就不同了,可以自己设置参数,提供歌词显示,参数都有说明和实例的,仔细看看吧,这是我最常用的情况:
Microsoft Windows XP
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Ching Chum>cd desktop
C:\Documents and Settings\Ching Chum\Desktop>cscript -nologo gMusic.wsf /p 花椰
菜之歌
http://audio9.top100.cn/201011140218/2F4A554E5C6C3CCCB9D5B83B5E21AECA/streaming
/Special_332050/M0332050001.mp3
http://lyric.top100.cn/Special_332050/M0332050001.lrc
花椰菜之歌
八十八颗芭乐籽
肆十肆只石狮子
275.0
************ 开 始 播 放 ************
摇滚乐【Rock'n'Roll】
不会放弃猴子 许多人的梦啊
梦中的那只猴子 正在练吉他
他点了点头 看着天空
蓝色和白色是今天的颜色
晚餐吃咖哩 是我的主意
但我不吃花椰菜 真是挑剔
如果能够再重来一次 世界从此改变
我会选择吃拉面 男人的口味
PLAY → 01:48 128kbps
一些额外的说明:
1. 如果播放的同时指定了要下载,可能会使播放的缓冲时间加长,当然如果你网速好就当我没说;
2. 这个东西一共有四个开关,你可以全部用或者全不用或者部分用,我特意把歌词放在错误通道显示,如果你懂命令行,就知道怎么不用播放也不用下载就取到纯的歌词。
3. 个人是很喜欢音乐的,也支持正版,买了很多CD,这个虽然是网上的,但巨鲸音乐做免费的正版估计也不容易,请不要用本脚本中的部分内容进行盗链或商业行为。
4. 如果你有学习VBS或者JS脚本的兴趣,可以看看源代码,基本上对的网络的常用操作都有,是很典型的例子。
附:使用说明
【Google Music Console】 (C)2010 Mr.Ching 『据说是李先生』
Copyright? music.Google.cn & Top100.cn
Usage: gMusic.wsf Song
Options:
Song : 歌曲信息相关的关键词,如歌名、歌手、专辑、歌词等。
p : 播放音乐的命令行,可使用动态变量。
无命令则使用脚本自己播放。
d : 下载歌曲的命令行,可使用动态变量。
无命令则调用脚本自己下载。
s : 指明要列出所有搜索结果进行选择,否则自动选择第一个结果。
若输入的序号在列出的范围内,则选择该项并继续;
若输入的序号小于零,则放弃并退出脚本;
若输入序号为零则翻页并重新选择;
否则要求重新输入。
l : 指明需要在通道二(错误输出)中输出歌词。
注意:
在用 wscript.exe 运行时,不接受任何参数。
动态变量是指用以替代当前歌曲的相关信息的一些特定字符串,它们是:
<N> 歌曲名
<AR> 艺术家
<AL> 专辑
<T> 歌曲总长秒数
<FMT> 文件扩展名
<URL> 歌曲链接URL
<LRC> 歌词链接URL
<QT> 一个双引号(")
实例:
wscript gMusic.wsf
cscript gMusic.wsf "梁祝 俞丽拿" /d:"curl <URL> -o <QT><N> - <AR>.<FMT><QT>"
cscript gMusic.wsf "because of you" /p:"wmplayer <URL>" /s /l 2>temp.txt
cscript gMusic.wsf "Dear Friend - 顺子" /d /p
cscript gMusic.wsf /p 吃一碗热腾腾的炸酱面
-------2010.11.16 附件修改----------
1. 修正了一个顺序错误。
2. 添加了比较多的注释,附带一个pdf文件方便观看。
Last edited by qinchun36 on 2010-11-16 at 13:35 ]
This Windows script (in WSF format) is what I use in CMD to listen to music online. The resource search service is provided by Google Music (actually it's piracy...), and the obtained music and lyrics resources seem to be provided by Juqing Music, with good quality. The most important thing is that I found the link speed is extremely fast!!!
Imagine opening a dark window and typing commands. To outsiders, it's already a very cool behavior. And you just type "Zhiziao also fell asleep" and hear the computer start playing Fish Leong's "Ningxia". The dark window even displays the lyrics along with the music, which is even cooler! Actually, it also supports downloading lyrics and songs simultaneously, which is simply all-round.
You can directly double-click it to run with the default wscript.exe, but this doesn't accept any parameters. It can only be run in the way I specified: played with wmplayer, which can only keep the lyrics;
While running with cscript.exe in the console is different. You can set parameters by yourself, provide lyrics display, and there are instructions and examples for the parameters. Take a good look. This is the situation I use most often:
Microsoft Windows XP
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Ching Chum>cd desktop
C:\Documents and Settings\Ching Chum\Desktop>cscript -nologo gMusic.wsf /p 花椰
菜之歌
http://audio9.top100.cn/201011140218/2F4A554E5C6C3CCCB9D5B83B5E21AECA/streaming
/Special_332050/M0332050001.mp3
http://lyric.top100.cn/Special_332050/M0332050001.lrc
花椰菜之歌
八十八颗芭乐籽
肆十肆只石狮子
275.0
************ 开 始 播 放 ************
摇滚乐【Rock'n'Roll】
不会放弃猴子 许多人的梦啊
梦中的那只猴子 正在练吉他
他点了点头 看着天空
蓝色和白色是今天的颜色
晚餐吃咖哩 是我的主意
但我不吃花椰菜 真是挑剔
如果能够再重来一次 世界从此改变
我会选择吃拉面 男人的口味
PLAY → 01:48 128kbps
Some additional instructions:
1. If downloading is specified while playing, it may increase the buffering time for playback. Of course, if your internet speed is good, just ignore what I said;
2. There are a total of four switches for this thing. You can use all, none, or part of them. I specially put the lyrics in the error channel. If you understand the command line, you know how to get pure lyrics without playing or downloading;
3. I personally like music very much and also support copyright. I have bought many CDs. Although this is online, it's not easy for Juqing Music to do free copyright, please don't use part of the content in this script for hotlinking or commercial behavior;
4. If you are interested in learning VBS or JS scripts, you can take a look at the source code. Basically, there are common operations on the network, which are very typical examples.
Attachment: Usage instructions
【Google Music Console】 (C)2010 Mr.Ching 『据说是李先生』
Copyright? music.Google.cn & Top100.cn
Usage: gMusic.wsf Song
Options:
Song : Relevant key words about song information, such as song title, singer, album, lyrics, etc.
p : Command line to play music, dynamic variables can be used.
If there is no command, the script plays by itself.
d : Command line to download song, dynamic variables can be used.
If there is no command, the script calls to download by itself.
s : Indicate to list all search results for selection, otherwise automatically select the first result.
If the input serial number is within the listed range, select that item and continue;
If the input serial number is less than zero, give up and exit the script;
If the input serial number is zero, turn the page and re-select;
Otherwise, re-enter is required.
l : Indicate to output lyrics in channel two (error output).
Note:
When running with wscript.exe, no parameters are accepted.
Dynamic variables refer to some specific strings used to replace the relevant information of the current song. They are:
<N> Song title
<AR> Artist
<AL> Album
<T> Total length of song in seconds
<FMT> File extension
<URL> Song link URL
<LRC> Lyrics link URL
<QT> A double quote (")
Examples:
wscript gMusic.wsf
cscript gMusic.wsf "梁祝 俞丽拿" /d:"curl <URL> -o <QT><N> - <AR>.<FMT><QT>"
cscript gMusic.wsf "because of you" /p:"wmplayer <URL>" /s /l 2>temp.txt
cscript gMusic.wsf "Dear Friend - 顺子" /d /p
cscript gMusic.wsf /p 吃一碗热腾腾的炸酱面
-------2010.11.16 Attachment modification----------
1. Corrected an order error.
2. Added a lot of comments, and attached a pdf file for easy viewing.
Last edited by qinchun36 on 2010-11-16 at 13:35 ]