The VBS that automatically plays music on the boot

Source: Internet
Author: User
Tags sapi

Today inadvertently saw the VBS this little thing, on the whim, self-taught a bit, pour out the following small things, Daniel do not spray! This can be used to make the sister-in-the-spirit to remind themselves!
How to use:Copy the program to TXT text inside save, and then suffix to vbs, throw to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup will be able to boot from the start!
Red for the song path, this should be set to, green to see mood changes, feel good enthusiastic about, don't waste!


Program 1:
CreateObject ("SAPI. SpVoice "). Speak "Blog Park"' Voice broadcast, you can enter any text
MsgBox "Blog Park"' Pop-up window prompt, you can enter any text, confirm close and continue to execute the following statement
Set w = CreateObject ("WMPlayer.OCX")
W.url = "D:\ used to Be you. mp3"' Please enter the path to the music file in double quotation marks
For i=0 to 1 ' Times
Wsh.sleep 3000 ' units Ms
Do until W.playstate = 1 ' plays 1 times after the end of the loop, the number is negative when the infinite loop, the function of until is to meet the condition to jump out of the loop
wscript.sleep 500 ' pause 500 ms
Loop
Next
' to be able to run you need to put this VBS file on this path and you can C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup



Program 2:
CreateObject ("SAPI. SpVoice "). Speak "My Love"' Enter any English
set Ws=createobject ("Wscript.Shell")
Ws.run "Wmplayer.exeD:\ used to Be you. mp3", 0 ' song path
' to be able to run you need to put this VBS file on this path and you can C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup

The VBS that automatically plays music on the boot

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.