KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Working with multiple items from list
Topic Summary: I'm trying to dictate a postcode using characters (Alpha Numeric) from a list
Created On: 05/14/2012 09:31 AM
Status: Post and Reply
Linear : Threading : Single : Branch
 Working with multiple items from list   - sniffcrisps - 05/14/2012 09:31 AM  
 Working with multiple items from list   - Alan Cantor - 05/15/2012 10:53 PM  
 Working with multiple items from list   - sniffcrisps - 05/21/2012 04:30 AM  
 Working with multiple items from list   - Stephan Kuepper - 07/16/2012 08:21 AM  
 Working with multiple items from list   - mhaines94108 - 07/16/2012 12:42 PM  
Keyword
 05/14/2012 09:31 AM
User is offline View Users Profile Print this message


sniffcrisps
New Member

Posts: 2
Joined: 05/14/2012

I have created a list called postcode containing the numbers 0-9 and the letters A-Z. I'd like to be able to activate the command by saying the command name "Insert Postcode" - followed by a postcode - E.G. "Insert Postcode SY45HP". The postcode numbers and letters should come from my list, but I'm also adding a space in between the 4th and 5th character. My script looks like this:

 Sub Main

Dim postcode As String
 postcode = ListVar1 & ListVar2 & ListVar3 & ListVar4 & " " & ListVar5 & ListVar6 & ListVar7

SendKeys postcode
End Sub

 

It doesn't seem to work! Have I written this correctly?

 05/15/2012 10:53 PM
User is offline View Users Profile Print this message


Alan Cantor
Top-Tier Member

Posts: 1488
Joined: 12/08/2007

Show us lists of possible values for all seven variables. Or are you using six variables? You example consists of six characters, but your code outputs seven.

I have developed similar commands, and usually find it is better to use lists with written and spoken forms:

1\one
2\two
...
0\zero
0\oh

Instead of specifying (for example) listvar1, you need code to extract the written form:

Mid(ListVar1, 1, Instr(ListVar1, "\" ) -1 )

 05/21/2012 04:30 AM
User is offline View Users Profile Print this message


sniffcrisps
New Member

Posts: 2
Joined: 05/14/2012

Hi,

The list contains numbers 0-9 and letters A-Z. The reason the script outputs seven chars is to incorporate a space in between two chars of the postcode - for formatting reasons.

 07/16/2012 08:21 AM
User is offline View Users Profile Print this message

Author Icon
Stephan Kuepper
Top-Tier Member

Posts: 470
Joined: 10/04/2006

Hi,
the point is that you need seven lists, even if they all contain the same elements. Dragon cannot put in item #1 from list 1 in position 1 and then item #2 from list 1 in position 2. Besides "ListvarN" means that the variable in this particular position is drawn from list N, so if you have one list to fill six variables you're five lists short of a sixpack :-)
I guess you've found that out yourself, seeing how much time has passed since your last post.

Stephan

-------------------------

www.egs-vertrieb.de - Speech Recognition Blog - Forum: www.immer-eine-Nuance-besser.de

 07/16/2012 12:42 PM
User is offline View Users Profile Print this message


mhaines94108
Junior Member

Posts: 39
Joined: 12/06/2010

Why not use the split function and split on "\"? Code with string indexing is usually hard to decipher and it's easy to get off-by-one errors.
Statistics
27373 users are registered to the KnowBrainer Speech Recognition forum.
There are currently 3 users logged in.
The most users ever online was 2028 on 04/05/2013 at 07:36 PM.
There are currently 85 guests browsing this forum, which makes a total of 88 users using this forum.

FuseTalk Standard Edition v4.0 - © 1999-2013 FuseTalk™ Inc. All rights reserved.