Get HomeSeer Now!

CREVIER
HomeSite Map
Categories
Pages
-
-
Scott Crevier
scott@crevier.org
-
HomeSeer Knowledge Base
-
How can I play a WAV file from a script?
-
Submitted by: Scott Crevier <scott@crevier.org>21-Nov-2000Doc #1010

I've used two methods with good success:
  1. Use hs.Launch to launch Windows Sound Recorder. Just pass it the path of the WAV file along with an option that says to play automatically and another option to tell it to close when it's done. The command line looks like this:

            C:\windows\sndrec32.exe /play /close c:\sound\ring.wav

    The only disadvantage to this is that it opens up the Sound Recorder program (which takes a second or two), and if you're using the PC when this launches, your keystrokes could interfere.

  2. Create an event in HomeSeer for a specific WAV file. On the "App/Sound/Email" tab, put the path to your WAV file where it says ".WAV File Path". Then in a script, you can use hs.TriggerEvent to trigger this event.


Get HomeSeer Now! Copyright © 1997-2008 Scott M. Crevier
Tue 21-Nov-2000
www.x10.crevier.org
-Click here for a $15 Gift Certificate!
Scott Crevier's Home Automation
-