Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27336

VS 2010 strText + anything else (Get inside for my info)

$
0
0
Hey everyone.

I'm working on a spech reognition module to put in my software for easy use. Now. The speech recognition works fine, but I have a question on something I want to do.
I have a String called strText which represents the text the software recognized (What the user said). I use it like

If strText = "Hello" Then
// do stuff.
ElseIf strText = "Open Google" Then
Process.Start("www.google.com/")
ElseIf strText = "Open YouTube" Then
Process.Start("www.youtube.com/")

Now about that it opens google/youtube. I figured an easier way to do it but I have no idea ho wto do so. I want it to do something like.

If strText = "Open" + Anything else after..
then Select Case,
if Google then open Google.
If YouTube then open YouTube.

I have no idfea how to do the "ANYTHING ELSE" after and then Select Case that anything else.
I know you guys hate when people don't even try to solve on their own, so I was thinking I could use "if strText.Contains("open"), then I'll use Substring or Split or whatever
to split the "open " and select case the rest.

Viewing all articles
Browse latest Browse all 27336

Trending Articles