I’m making a program that needs to play a music file (either .wav or .mp3, whichever can work) and I can’t figure out how to make it so the window that plays the music cannot be seen. At all. I know theres a way but I can’t find any ( I searched Google for hours). I need a way that works for Vista/Windows 7.
what language are you using to write the program
a batch file is not a program, it’s a script
Yea, you need to format C:\
bat or VBS cant natively play audio files. You will need a helper file or use another language.
Plus, if you wrote a batch file, the command prompt would show up, not exactly a good way to avoid having any windows visible.
What is your program supposed to do anyway? just play music?
well you can launch batch files without output as a service using wscript exec commands (VBS). Used that back in the hacksaw/switchblade era, Also still works nice for startup scripts.
Download cmdmp3 from here:
Then extract the cmdmp3.exe file. Create a batch file (songs.bat) that says:
Then a file called invis.vbs:
And finally launch.bat:
Then just running launch.bat will cause it to happen in the background. Don’t know if that’s exactly what you wanted or not but it does work quite nicely.
^ OP probably wanted to pull a prank on someone congratulations you made it happen
Nice, personally I’d have the one .bat file (launch) that creates the .vbs file and the other .bat file (songs). After songs and the vbs are run they’d be deleted. This means:
a) Less files lying around
b) One single file to edit if you want to change anything
OR just trying and do it all from a .vbs script.
I’m down with that. What do you think I used the knowledge for?
Let’s face it, anybody who did a computer science degree knows more about pulling pranks than anything their course covered.
Actually, I want the command prompt to be visible.
And it isn;t going to be used in a prank.
I’m trying to make a command prompt like the one on https://www.aperturescience.com (They took it off =/) I’m trying to make GLaDOS.
And I need it to play Still Alive.
If I use this, and I give my finished script to a friend, will he have to install cmdmp3 as well?
Not if you give him the binary in the same folder, no.
Invest in a gas mask.
The cmdmp3 link is broken =/.
EDIT: Nvm, I got it working, this is sweet! Thanks ManlyStump and Wheybag!
Now for the final problem. This one might actually be impossible to do, but may as well see if it is.
Is there a way to make it type like the portal credits did?
EDIT 2: Also, I’m getting an error with that script for putting it into the background. it says that invis.vbs has the error: “Library not registered” Code: 8002801D Line 1 Char 1 Source (null)
Odd. Do you definitely have wscript on your system? (I assumed it was just there)
telnet server
I confirmed I have wscript on my computer.
Now I need to know: Is it possible to make it so that it types letters, like at the end of Portal? If so, how? (I searched all over google for this =/)