User to user discussion and support for UltraEdit, UEStudio, UltraCompare, and other IDM applications.

Building, compiling, or debugging issues
4 posts Page 1 of 1
Is there a way to make UEStudio play a sound when compilation succeed ?
Are you serious?

UEStudio has no sound options. You are by sure the first user who wants a sound being played from a text editor / IDE as far as I know.

You could modify the [Build] section of the compiler configuration you use and append a command which plays a sound as explained for example at How can I play a sound file from a Windows batch file?

I must add that I have not tested if that really works and how exactly the command must be defined in the compiler configuration to play the sound file (*.wav, *.mp3) only on success of entire compilation.
Best regards from Austria
There are times, when compiling very large programs with an archaic compiler that is slow, that the programmer would like an audible cue to know when it is finished so that he can put down his coffee and resume work, or so that he can come back from the next room, or whatever.

Also, it is a scientific fact that a person will respond faster to an audible than to a visual, keeping the workflow more productive.

You will have to edit your compiler's configuration in order to do this.

Under the menu options "Build->Select Compiler", you will get a Select Compiler dialog box. Find the compiler you are using, which should already be selected for that project, and click "Edit configuration." Now, since I don't know the compiler you are using or all the compiler options, I am going to be VERY "general" with the "details."

Find the section for make or build or compile, whichever has the command being used for your compile. You will see a "Cmd0=" followed by the command necessary for the compile. You can add additional commands, which will be executed in order. This allows you to change Cmd0 to Cmd1, and add a new Cmd0 that would be executed before the actual compile, for example. Or, leave it as Cmd0 and add a Cmd1. For the Cmd1= add a command that will play a sound file of your choice. It is probably best to run the sound file from a batch file that will launch a sound player that will exit on completion of playing the sound. That's right, you'll have to configure yourself an external program that will play the sound for you, and then close itself. You can also use a "command line sound player" that will play the sound and then exit. You can do a search for such a utility. I've never used it, but on such a search I quickly found sounder.exe which advertises to do exactly what you'd need. I would recommend placing it in your system path if you use it. I can't recommend the program itself, as I've never tried it, though I'm likely to, as I like having command line utilities of every sort just in case.

Making it play a particular sound only on success is the tricky part, you would have to use another 3rd party program to call the compiler, that will echo the output produced by the compiler so that UEStudio can capture that output to the Output Window. This 3rd party program will need to be able to interpret the output as it is displayed in order to determine if it was success or failure, or optionally, if the compiler returns an error code that can be read, a batch file could be created to call the compiler and read the error code and launch a sound for success or another sound for failure. You'll have to check to see if your compiler uses exit codes. Some do, and a few do not, at least in my experience, which is not very vast as far as many different compilers go. The batch file would of course need to be called using that Cmd0= option in your configuration file in place of calling the compiler directly.

Let us know how that works out for you. I know I've run other programs to be launched both before and after a compile using this method, so it should work just fine for you as well, as long as you get the program syntax correct.

This is part of the beauty of UEStudio. The developers couldn't think of everything a user might want to possibly do, but the possibility is there to make it work anyway in most cases, with a little creativity.
“Don’t document the problem, fix it.” – Atli Björgvin Oddsson
Thanks for your answers guys. I'm gonna try them.
And, Visual Studio plays a sound when compilation succeed, which is very pratical, and I'm used to it.
4 posts Page 1 of 1