Announcement

Collapse
No announcement yet.

Playing a wav file on a client

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Playing a wav file on a client

    I am using the message link command to execute a wav file on a client. However, the client brings up Windows Media Player to play the file and then leaves Windows Media Player open. All I want to do is simply play the sound file.

    This should be easy. Is there an option in Windows Media Player or should I assign wav files to another program?

    Jim Doolittle
    Jim Doolittle

    My Twitter
    My Hardware & Software

    #2
    Jim,

    I think the easiest way would be adding two line of code in each application to have a function like “message wav to client”.

    Regards,
    Christian

    Comment


      #3
      Christian,

      I misunderstood your reply. Did you mean that you would add the command to Message Server?

      Meanwhile, I found a command line wav player that was the first item in a Google search and it's free.

      I will try it now. I imagine it will process wav quickly and it supports command line switches to change volume or perform repeats.

      If you do add a command, I will use the Message Server command and keep this dos command program handy for other efforts.

      Jim Doolittle
      Jim Doolittle

      My Twitter
      My Hardware & Software

      Comment


        #4
        I couldn't get the command line player to work via MessageLink command so I did a Google search.

        I found instructions for playing wav files without loading Windows Media Player GUI here. When I checked my file types, wav files were associated with the wmp but the entry did not have the /Close parameter.

        Works fine for now.

        FYI, this all started because I have my HomeSeer Server in my basement and I have an event that plays an alarm wav when the garage door opens. I am using Message Server to play the wav on other computers. Kids were asking why Windows Media Player kept opening up every time the garage door opened. I told them to quit opening the garage door . Now I can use the better solution in not having WMP stay open.

        Jim Doolittle
        Jim Doolittle

        My Twitter
        My Hardware & Software

        Comment


          #5
          Jim,

          Sorry if I was not clear enough this morning.

          Yes I will add this feature to message server it’s only two line of code in each application but will not be ready until probably end of next week I’m in a middle of some internal code cleaning and trying to change some functions for better efficiency.

          P.S. MessageLink function will not work with command use this instead.
          <pre class="ip-ubbcode-code-pre">MessageExeLink(strExe As String, Optional strParam1 As String, Optional strParam2 As String, Optional sClient As String)</pre>
          Regards,
          Christian

          Comment


            #6
            I'm building a script where I want to play a few wave files and I didn't want to use hs.playwave so a little research had to be done.

            Everybody had the good old mplay32.exe (in windows/system32 dir)

            CommandLine:
            Mplay32 /Play /Close &lt;WaveFileName&gt;

            This will open the MPlayer play the wave file and close the player. If you don't want to see the player you have to use for example vbscript to hide the window.

            Hope this will help

            Comment


              #7
              I forgot about that since Jim had it working it pull out the pressure of me.

              Use this command for Message Server
              hs.Plugin("Message Server").MessageWave "C:\WINDOWS\MEDIA\Windows XP Logon Sound.wav",Optional client

              I’m sending a command not the file if the file is not present the client will get and error but I will change this in the next BETA release I’m using the same function as if you are trying to play the sound for message events which is not good.

              Regards,
              Christian

              Comment

              Working...
              X