|
Answer» Is it possible to make the batch file play music within it self I'm using Window's XP
I need this info FAST for a project I am doing.Not directly. It's possible to make the PC beep (echo [ctl-G]) but a single beep does not a symphony make . You can launch an audio file by taking advantage of Windows' file associations. If you launch a mp3 file, Windows will launch the application that can play mp3 music files. Depending on how the mp3 file is launched, the batch file may WAIT for the music to finish or the music and your batch file may run totally independent of each other.
Batch code is not a programming language but rather a means to bundle a series of commands, SAVING the user from repetitively typing them in manually. Consider using any of the Windows Script languages (VBScript, JScript, REXX, Python, Perl, etc) for more FUNCTIONALITY than batch code offers.
ThanksSidewinder -- How do you pass the CTRL-G into an instruction in the batch. I was browsing over this one and never saw this command before, yet it works from command line, but when creating command in editor it does not show character set when pressing CTRL-G. I TRIED the same echo [ctl-G] and it doesnt take that as a valid command.
I thought Beeping was gone with MS removal of the Beep Command in earier DOS versions, unless you created a program to make the beep in basic etc that would execute through the batch.
Neat that it works when typing in directly to command line... I am sure there is a way to point it to a combination keystroke to make it happen, but not sure how.... So hows it done? Thanks!!!The bell or beep is ascii 7. You'll need an editor from the Dark Ages that can accept control keys.
Edit:
Type echo Type space Type CTL-P Type CTL-G Press enter
Edlin:
Type echo Type space Type CTL-G Press enter
Note: CTL-G and CTL-P are key combinations, not literals.
I tried to post an example but the forum wouldn't accept the ascii 7 character.
PS. The square brackets in my post were misleading; was unsure how the represent an unprintable character.
|