KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Manipulating text strings in KnowBrainer.
Topic Summary: Is the following possible?
Created On: 08/24/2010 06:11 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 Manipulating text strings in KnowBrainer.   - dkehler - 08/24/2010 06:11 PM  
 Manipulating text strings in KnowBrainer.   - Lunis Orcutt - 08/25/2010 02:23 AM  
 Manipulating text strings in KnowBrainer.   - dkehler - 08/25/2010 12:32 PM  
 Manipulating text strings in KnowBrainer.   - R. Wilke - 08/26/2010 02:00 AM  
 Manipulating text strings in KnowBrainer.   - dkehler - 08/26/2010 12:38 PM  
 Manipulating text strings in KnowBrainer.   - R. Wilke - 08/26/2010 02:29 PM  
 Manipulating text strings in KnowBrainer.   - dkehler - 08/26/2010 03:28 PM  
 Manipulating text strings in KnowBrainer.   - R. Wilke - 08/26/2010 03:56 PM  
 Manipulating text strings in KnowBrainer.   - dkehler - 08/26/2010 04:03 PM  
 Manipulating text strings in KnowBrainer.   - Lunis Orcutt - 08/26/2010 09:56 PM  
 Manipulating text strings in KnowBrainer.   - GDS - 08/25/2010 12:36 PM  
 Manipulating text strings in KnowBrainer.   - dkehler - 08/25/2010 12:43 PM  
Keyword
 08/24/2010 06:11 PM
User is offline View Users Profile Print this message

Author Icon
dkehler
Member

Posts: 112
Joined: 11/18/2006

I'm planning on migrating from vocola/Unimacro to KnowBrainer when I get ahold of NaturallySpeaking Premium 11 (hopefully tomorrow).

One particularly useful Unimacro macro that was kindly written for me will take a selection and transform it to uppercase and insert hyphens between the letters as in the following example:

"David Kehler" becomes "D-A-V-I-D K-E-H-L-E-R".

I need this because in doing court transcription, this is how it is denoted when somebody is spelling their name, for example.

I was thinking that the best way to accomplish this in KnowBrainer would be to copy the selection to the clipboard, then manipulate it and paste it back after being modified.  In researching this idea, I have not stumbled across an easy way to dump the contents of the clipboard into a variable for manipulation.  Is this possible in KnowBrainer and/or is this the best way to accomplish my goal?

-------------------------
David
 08/25/2010 02:23 AM
User is offline View Users Profile Print this message

Author Icon
Lunis Orcutt
Top-Tier Member

Posts: 22772
Joined: 10/01/2006

The trick is trying to figure out how to put a hyphen between each letter. The all CAP part is simple enough to do with HeardWord script.

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


Click KB 2012 REV D to Download a 30 Day Evaluation of KnowBrainer 2012
Click SpeechStart+ to Download a 15 Day Evaluation of SpeechStart+

 08/25/2010 12:32 PM
User is offline View Users Profile Print this message

Author Icon
dkehler
Member

Posts: 112
Joined: 11/18/2006

I was envisioning some sort of loop based on the length of the selected text, but again, is it possible to set a variable to the value of the clipboard?


-------------------------
David
 08/26/2010 02:00 AM
User is online View Users Profile Print this message

Author Icon
R. Wilke
Top-Tier Member

Posts: 4422
Joined: 03/04/2007

Quote:
I was envisioning some sort of loop based on the length of the selected text, but again, is it possible to set a variable to the value of the clipboard?

This would be the way to do it, but only the Professional version has variables and string operations required.

Rüdiger

 



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

Well, it's past the point where we can make any changes in the code, but we can still make changes to the Easter Egg!

 08/26/2010 12:38 PM
User is offline View Users Profile Print this message

Author Icon
dkehler
Member

Posts: 112
Joined: 11/18/2006

^ Really?  KnowBrainer seems to have string manipulation tools that should be up to the task if I could just figure out how to manipulate the contents of the clipboard.


-------------------------
David
 08/26/2010 02:29 PM
User is online View Users Profile Print this message

Author Icon
R. Wilke
Top-Tier Member

Posts: 4422
Joined: 03/04/2007

I don't know, perhaps so, although I don't think so, but how would you want to do that when not having variables?

Rüdiger

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

Well, it's past the point where we can make any changes in the code, but we can still make changes to the Easter Egg!

 08/26/2010 03:28 PM
User is offline View Users Profile Print this message

Author Icon
dkehler
Member

Posts: 112
Joined: 11/18/2006

^ I presumed there were variables because there are things like I = 22, loop until I = 0, I = I -1 possible in KnowBrainer.  What is "I" if not a variable?


-------------------------
David
 08/26/2010 03:56 PM
User is online View Users Profile Print this message

Author Icon
R. Wilke
Top-Tier Member

Posts: 4422
Joined: 03/04/2007

Are you sure that this is genuine KnowBrainer code?

Rüdiger



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

Well, it's past the point where we can make any changes in the code, but we can still make changes to the Easter Egg!

 08/26/2010 04:03 PM
User is offline View Users Profile Print this message

Author Icon
dkehler
Member

Posts: 112
Joined: 11/18/2006

Maybe I'm getting confused.  It appears to be in the verbal BASIC manual, which I presumed was the guide to writing commands in KnowBrainer.

In any event, I have now solved my problem by going back to vocola, which, in fact, works with Dragon 11. I realize it's not quite as powerful as KnowBrainer, and I appreciate that Lunis gives KnowBrainer away to people like me with disabilities, but vocola, even with its quirks, seems to be far easier to use in most cases.



-------------------------
David
 08/26/2010 09:56 PM
User is offline View Users Profile Print this message

Author Icon
Lunis Orcutt
Top-Tier Member

Posts: 22772
Joined: 10/01/2006

The looping command you were referencing is available in KnowBrainer but KnowBrainer's command capabilities are limited, especially this area.

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


Click KB 2012 REV D to Download a 30 Day Evaluation of KnowBrainer 2012
Click SpeechStart+ to Download a 15 Day Evaluation of SpeechStart+

 08/25/2010 12:36 PM
User is online View Users Profile Print this message

Author Icon
GDS
Top-Tier Member

Posts: 757
Joined: 01/16/2009

At the opposite end of the spectrum, one thing I commonly do in my line of work is turn D-A-V-I-D into david. That's very easy to do using Find and Replace and No Caps That. Like Lunis was saying, the tricky part is figuring out how to reliably get that hyphen in to a printed word after every letter. I can be done, I'm sure. I also bet that the professional consultants on this board could show you how to do it. Personally, it's beyond the scope of my abilities. What does seem simple, though, if you're comfortable with spelling, is a "Letter mode." That is, you could say "Letter Mode on" and then spell your name and Dragon would produce D-A-V-I-D.

If that suits your needs I might be able to start the script for you, but it's not what you asked for so maybe there are better ideas out there.



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

Eric Wright At work: DNS 12 Pro. At home: DNS 11.5 Pro,  KnowBrainer 2011, and Utter Command by RedStart Systems; Dragon Dictate 3 for Mac


 


Appetite for Dictation - My Blog

 08/25/2010 12:43 PM
User is offline View Users Profile Print this message

Author Icon
dkehler
Member

Posts: 112
Joined: 11/18/2006

^ That sounds like a reasonable alternative if what I'm proposing is not possible.  I'm fairly certain I can get my idea to work if it's possible to manipulate the contents of the clip board via a variable.


-------------------------
David
Statistics
27430 users are registered to the KnowBrainer Speech Recognition forum.
There are currently 7 users logged in.
The most users ever online was 2028 on 04/05/2013 at 07:36 PM.
There are currently 169 guests browsing this forum, which makes a total of 176 users using this forum.

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