Page 1 of 1
Devices and how to play a Wav file?
Posted: Wed Dec 03, 2003 11:01 am
by gary uk
Hi,
When a task has run I wish to play a wav from the Devices section, what do I type into the "Path and name of program" too achieve this?
I tried path to the Wav but that doesn't work?
Regards,
Gary
Posted: Wed Dec 03, 2003 11:37 am
by ScottBot
One way would be to use the path and file name of a player application. For example using C:\Windows\System32\SoundRec.exe and then using the "/play /close" and the WAV file name as the Arguments should work.
Scott
Posted: Wed Dec 03, 2003 11:42 am
by MichaelK
Scott, you mention "and the WAV file name as the Arguments should work."
Is there a way to assign a file chosen from a directory listing to a variable , and then place this variable in a play argument?
For example, if I do a directory listing on a remote machine, select a file, can this file name (or path, or UNC path) be saved to a variable, which can then be used in a "play" argument when controlling another media player?
Thanks!
Posted: Wed Dec 03, 2003 12:02 pm
by ScottBot
I think you should be able to do it using a Task and Property Value substitution strings. It's an extra hoop to jump through, but it should work.
Scott
Posted: Wed Dec 03, 2003 12:17 pm
by MichaelK
Well, I think you see where I'm going with this, no? I do a directory listing, and cause the file I click on to launch a player on another computer utilizing the UNC name. Perhaps a workaround for using winamp on a remote machine.
~Michael
Posted: Thu Dec 04, 2003 6:09 am
by gary uk
One way would be to use the path and file name of a player application. For example using C:\Windows\System32\SoundRec.exe and then using the "/play /close" and the WAV file name as the Arguments should work.
Scott
Hi Scott
Tried that and lots of other ways with different players, but they will not work?
"C:\WINDOWS\sndrec32.exe" /play /close c:\correct.wav
This does from the RUN command line interface, but not HouseBot?
Ideally i just want to play a wav file and not see any pop up windows etc?
Regards,
Gary
Posted: Thu Dec 04, 2003 8:44 am
by ScottBot
Gary,
Strange that it works from a command prompt, but not HouseBot. It works on my XP system, but it does popup the Sound Recorder application for a moment.
There may be ways of running something else in the system that won't display an application, but I'm not familiar with them.
If you're a developer, you could write a very simple application to call the PlaySound() API using the file name passed on the command line. You might even be able to find something like this on a download site somewhere.
Scott
Posted: Thu Dec 04, 2003 9:44 am
by gary uk
Hi Scott
I am running WIN98
the syntax that you typed is different, may be slightly different software?
"C:\WINDOWS\sndrec32.exe" /play /close c:\correct.wav
C:\Windows\System32\SoundRec.exe
Can I suggest that you add the ability to play a wav, MP3 etc, file to your next Version wish list?
As I am sure it would add too the interactivity of your software?
Anyway Scott, great software and when version 2 comes out, i am sure it will be easier to use
Regards,
Gary
Posted: Thu Dec 04, 2003 5:03 pm
by gary uk
The following works in msdos and the RUN command but not in HouseBot ?
C:\windows\mplayer.exe/play /close c:\windows\correct.wav
I have placed this in "Devices" "path and name of program" "value", is this the right place?
If you place C:\windows\mplayer.exe in the same place it runs the application (but obviously thats all)
It seems HouseBot may not be passing on the data after the exe?
I am running Win98
Regards,
Gary
Posted: Thu Dec 04, 2003 8:40 pm
by ScottBot
Gary,
Put the /play /close c:\windows\correct.wav in the Arguments Property.
Scott
Posted: Fri Dec 05, 2003 6:01 am
by gary uk
Thanks Scott
Now works fine, I though I would reply as I am sure someone else will read this in the future, so it will help them to get a WAV etc file running!
Regards,
Gary[/quote]