![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-12 11:35 |
47,811 topics / 349,897 posts / today 0 new / 48,256 members |
| DOS批处理 & 脚本技术(批处理室) » [Share] Online Music Player |
| Printable Version 3,136 / 15 |
| Floor1 qinchun36 | Posted 2010-11-14 03:28 |
| 高级用户 Posts 400 Credits 609 | |
|
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 ] Attachments gMusic.wsf.zip (8.64 KiB) gMusic.pdf.zip (370.96 KiB) |
|
| Floor2 netbenton | Posted 2010-11-14 08:20 |
| 银牌会员 Posts 752 Credits 1,916 From 广西 | |
|
I tried it and it didn't work. The error messages are as follows:
gMusic.wsf(0, 1) Windows Script Host: Character set not supported: gb18030 gMusic.wsf(0, 1) Windows Script Host: Cannot convert text to UNICODE for processing |
|
| Floor3 ccwan | Posted 2010-11-14 08:32 |
| 金牌会员 Posts 1,160 Credits 2,725 From 河北廊坊 | |
|
Thanks for sharing
|
|
| Floor4 qinchun36 | Posted 2010-11-14 17:48 |
| 高级用户 Posts 400 Credits 609 | |
Originally posted by netbenton at 2010-11-14 08:20: What kind of computer do you have that doesn't support this encoding... Then you can try opening the code with Notepad, change gb18030 in the first line to gb2312, this should be supported, save it in ANSI format; Or delete encoding="gb18030" and save it in UNICODE format, it should work. |
|
| Floor5 523066680 | Posted 2010-11-14 19:43 |
| 银牌会员 Posts 1,133 Credits 2,362 | |
|
The broken computer has no speaker... But this post needs to be topped!
|
|
| Floor6 netbenton | Posted 2010-11-15 04:41 |
| 银牌会员 Posts 752 Credits 1,916 From 广西 | |
|
Changed gb18030 to gb2312,
Really can put it, good yeah~~~~ Need to study it well~~ Thank the LZ for sharing~~ |
|
| Floor7 radem | Posted 2010-11-20 15:02 |
| 高级用户 Posts 383 Credits 691 | |
| Floor8 nakay1 | Posted 2010-11-21 13:54 |
| 初级用户 Posts 22 Credits 34 | |
|
We need to study it carefully.
|
|
| Floor9 chy505908440 | Posted 2010-11-21 14:49 |
| 初级用户 Posts 74 Credits 120 From 河北 | |
|
This must be kept!
|
|
| Floor10 zaixinxiangnian | Posted 2010-11-21 18:52 |
| 初级用户 Posts 106 Credits 151 From 河南省 | |
|
This doesn't seem to run under CMD... Here it calls PLAYER to play it.
|
|
| Floor11 kingjyb | Posted 2010-11-24 16:43 |
| 新手上路 Posts 1 Credits 1 | |
|
Got it!
|
|
| Floor12 netbenton | Posted 2010-12-07 07:21 |
| 银牌会员 Posts 752 Credits 1,916 From 广西 | |
|
After looking at the commented source code, I finally understand something.
There are many things worth learning. |
|
| Floor13 bibo35 | Posted 2010-12-07 15:56 |
| 新手上路 Posts 1 Credits 1 | |
|
Still need player support
|
|
| Floor14 lqs623 | Posted 2010-12-07 22:32 |
| 贫困用户 Posts 30 Credits -3 | |
|
Received!!!
|
|
| Floor15 qinchun36 | Posted 2010-12-08 10:48 |
| 高级用户 Posts 400 Credits 609 | |
Originally posted by lqs623 at 2010-12-7 22:32: There are actually poor people coming to support! Did you delete your posts until you were poor? |
|
| 1 2 Next |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |