Ok, I have been using Microsoft's SAPI, to "well try to do everything"
And have had alot of success. I can open applications, play music, calculate math equations, and even retreive defenitions of words from "www.dictionary.com" using WinSock.
I designed it, much like StarTrek TNG. I say "computer" and the sound from the TV show plays, then I can give commands.
OK, now I have a new Sub that opens WinAmp and a specific radio station.
It actually opens a browser with a specific string, then the browser opens WinAmp and the music plays.
Sub PlayGenre(ByVal strGenre As String)
' plays a sound letting me know the command was recognized
PlayWav("C:\VB6SBS\TTS testing\New Folder (3)\c55.wav")
' trying to get a handle on WinAmp
Dim myProcess As Process = New Process
myProcess.StartInfo.FileName = "winamp.exe"
' determine what genre was asked for and open the webpage
Select Case strGenre
Case "jazz"
System.Diagnostics.Process.Start("http://www.shoutcast.com/sbin/shoutcast-playlist.pls?rn=6390&file=filename.pls")
Case "house"
System.Diagnostics.Process.Start("http://www.shoutcast.com/sbin/shoutcast-playlist.pls?rn=6151&file=filename.pls")
Case "rock alternative"
System.Diagnostics.Process.Start("http://www.shoutcast.com/sbin/shoutcast-playlist.pls?rn=7659&file=filename.pls")
Case "blues"
System.Diagnostics.Process.Start("http://www.shoutcast.com/sbin/shoutcast-playlist.pls?rn=6999&file=filename.pls")
Case "new Orleans"
System.Diagnostics.Process.Start("http://www.shoutcast.com/sbin/shoutcast-playlist.pls?rn=7421&file=filename.pls")
Case "big band"
System.Diagnostics.Process.Start("http://www.shoutcast.com/sbin/shoutcast-playlist.pls?rn=1160&file=filename.pls")
Case "alternative"
System.Diagnostics.Process.Start("http://www.shoutcast.com/sbin/shoutcast-playlist.pls?rn=5004&file=filename.pls")
Case Else
myProcess.Kill() ' if not recognized try to close winamp
End Select
End Sub
I am trying to close the WinAmp Application using
' called at the beginning of the SUB
Dim myProcess As Process = New Process
myProcess.StartInfo.FileName = "winamp.exe"
'
' then in any case else situation
Case Else
myProcess.Kill()
But this isn't working.
I am thinking maybe I need to instead of calling the webpage, that I need to open WinAmp as a Shell statement and somehow pass what station I want to play. I would have control over the handle.
I'll pop over to the WinAmp forums, but I doubt they will be much help.