I had a need to play a sound and vibrate my phone in a script-like setting (specifically, actions in the amazing Rhodium Keyboard Controller app). I couldn't find a simple app to let me do this. So I wrote one! It took about 10 minutes. :) I now share this with you because I'm sure somebody else has had the same need.
Like this app? Want more like it? Tip a buck (or Euro or Pound or whatever) or two to help the author out! Click here to make a safe donation via PayPal.
1. Copy the PlaySound.exe file somewhere, like \Windows.
2. In your script or LNK, use command line arguments to tell it what to do. A single command line argument means that you are specifying a path to a sound to play. It will only play WAV files (sorry if you want WMA or MP3 etc you will need to convert). If you specify two arguments, it means you want to vibrate the phone. The first argument is the LED index of the vibrate (usually 1), and the second is length of time to vibrate in milliseconds.
3. If you do not specify command line arguments, or specify invalid ones (wrong path, negative number, etc.), it will fail without any notice (run, then immediately quit). This app will not tell you when something goes wrong.
Play the loudest.wav sound in \Windows
Vibrate a Touch Pro 2 for half a second
playsound.exe 1 500
Remember to enclose the path in quotes if you have spaces in the path name to your file, or else PlaySound will interpret it as multiple arguments and think you want to vibrate. (for example, playsound.exe "\Program Files\My App\Sound.wav")
This app is released into the public domain with no warranty. That means you can redistribute it at will and do not even have to give me credit. I would appreciate credit, though. ;) Enjoy!
At least WM5 (fully compatible with WM6/6.1/6.5). It should work on touchscreen and non-touchscreen devices both, but I haven't tested it on a non-touchscreen device yet.
It's highly doubtful that I will ever update this app. If you need more features, feel free to use the source and compile your own!
Attached to this post is the app and full source code.