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:
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
-------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 ]
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 ]
Recent Ratings for This Post
( 2 in total)
Click for details

