Instant Elevator Music API
Instant Elevator Music 2 has an API that allows you to trigger elevator music from your own programs. This can be done in two ways: via the command-line or via a named pipe.
The command-line interface is the easiest interface to use, since all you need to do is run instantelevatormusic.exe with one of the following command-line parameters:
instantelevatormusic.exe -play app_name - Starts playing elevator music
instantelevatormusic.exe -stop app_name - Starts playing elevator music
app_name is the name of your application. This is used to identify requests from this application.
NOTE: When you call the "stop" command, the application name must be the same as the one you used when you issued the "play" command. Otherwise, the music won't stop.
The commands can also be issued via a named pipe. Named pipes are a form of inter-process communication available through the Win32 API. The named pipe used by Instant Elevator Music is located at "\\.\pipe\instantelevatormusic". Open this named pipe and send to it one of the following commands (formatted as ASCII text):
play app_name - Starts playing elevator music
stop app_name - Stops playing elevator music
app_name is the name of your application. This is used to identify requests from this application. Just like the command-line API, you need to ensure you pass the same app_name to Instant Elevator Music each time you call the command. Otherwise, you won't be able to stop the music.
Here is a sample program in C# that starts/stops elevator music. If you want an easy way to use elevator music, just copy the ElevatorMusic class into your own project, and call the static methods StartElevatorMusic(appname) and StopElevatorMusic(appname).
Ignoring your application
Users can choose to ignore your application using the Ignore List feature of Instant Elevator Music. When music has been triggered by an external application, the user can right-click the Instant Elevator Music system tray icon and choose Ignore (application name) to ignore requests from your application. They can also turn off the API entirely by going into Settings -> Advanced tab and unticking Allow other programs to trigger elevator music.