User forums > Using Code::Blocks
Playing a sound when compilation has finished/failed
4ian:
Hello,
I'm looking for a way to get Code::Blocks to play a sound when compilation has finished or has failed.
Sometimes, compilation process can take a while, and having a sound played when the process is finished could help. ( For instance, I often do something else, as go on internet ).
Do you know if there is any way to do this currently ? Maybe it could be a good idea to add such an ( optional ) feature to Code::Blocks ( using wxSound for example ).
killerbot:
first thing that comes to mind : post build step that launches your favorite mp3 player software and you give the mp3 to play as a command line argument to the player
4ian:
I've tried to add : "Execute("MyProgram.exe");" to post-build steps, but it does not seems to work. ( Post build steps aren't Squirrel scripts maybe ? ).
Jenna:
--- Quote from: 4ian on February 22, 2010, 06:27:00 pm ---I've tried to add : "Execute("MyProgram.exe");" to post-build steps, but it does not seems to work. ( Post build steps aren't Squirrel scripts maybe ? ).
--- End quote ---
No, the commands you type there are just executed in the default shell.
In your case just use "[path_to]MyProgram.exe"
See the manual for more details: http://www.codeblocks.org/docs/main_codeblocks_en.html
4ian:
Indeed, it works well with a command line like "c:\Program Files\VideoLAN\VLC\vlc.exe C:\Windows\Media\chimes.wav --play-and-exit". :)
Alas, when compilation fails, the post build steps aren't run..
Navigation
[0] Message Index
[#] Next page
Go to full version