J JTKEK Member Licensed User Longtime User Aug 19, 2015 #1 i use example from voice recognition first button : to get voice and compare the string with the list second button : to get voice and store in a list i have problem when scan the list then compare the string #update test.zip Attachments test.zip 12.4 KB · Views: 314 Last edited: Aug 19, 2015
i use example from voice recognition first button : to get voice and compare the string with the list second button : to get voice and store in a list i have problem when scan the list then compare the string #update test.zip
DonManfred Expert Licensed User Longtime User Aug 19, 2015 #2 My first thought: B4X: If s1=0 Then ReadListExample Else If s1 = 0 Then WriteListExample End If WriteListExample will never be called Upvote 0
My first thought: B4X: If s1=0 Then ReadListExample Else If s1 = 0 Then WriteListExample End If WriteListExample will never be called
J JTKEK Member Licensed User Longtime User Aug 19, 2015 #3 actually the writelistexample is called the problem is when code below execute is will error B4X: For i = 1 To 100 If transfer = list1.Get(i) Then Label3.text = list1.Get(i) Label1.Text = "good" Exit End If Next if i use code below it will works fine, but it only compare with 1 item B4X: If transfer = list1.Get(0) Then Label3.text = list1.Get(0) Label1.Text = "good" End If i want to compare with many item Upvote 0
actually the writelistexample is called the problem is when code below execute is will error B4X: For i = 1 To 100 If transfer = list1.Get(i) Then Label3.text = list1.Get(i) Label1.Text = "good" Exit End If Next if i use code below it will works fine, but it only compare with 1 item B4X: If transfer = list1.Get(0) Then Label3.text = list1.Get(0) Label1.Text = "good" End If i want to compare with many item
DonManfred Expert Licensed User Longtime User Aug 19, 2015 #4 JTKEK said: actually the writelistexample is called Click to expand... not in the code i posted out of your code... B4X: Else If s1 = 0 Then should be B4X: Else If s1 = 1 Then Upvote 0
JTKEK said: actually the writelistexample is called Click to expand... not in the code i posted out of your code... B4X: Else If s1 = 0 Then should be B4X: Else If s1 = 1 Then
J JTKEK Member Licensed User Longtime User Aug 19, 2015 #5 ah... my mistake i have repaired the code but some word give a random error like picture below Upvote 0
DonManfred Expert Licensed User Longtime User Aug 19, 2015 #6 asuming your list is "list1" B4X: For i = 0 To list1.Length -1 Upvote 0
J JTKEK Member Licensed User Longtime User Aug 19, 2015 #7 sorry, where should i put these code after initialize ? Upvote 0
J JTKEK Member Licensed User Longtime User Aug 19, 2015 #8 i just change B4X: For i = 0 To 100 with B4X: For i = 0 To list1.Length -1 thanks you donManfred, now it works Upvote 0
i just change B4X: For i = 0 To 100 with B4X: For i = 0 To list1.Length -1 thanks you donManfred, now it works