KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Need help writing command
Topic Summary: Want commands which toggle to the first field (variable) as part of the command
Created On: 06/28/2012 05:43 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 Need help writing command   - Miradorrad - 06/28/2012 05:43 PM  
 Need help writing command   - monkey8 - 06/28/2012 05:51 PM  
 Need help writing command   - Larry Allen - 06/28/2012 07:12 PM  
 Need help writing command   - Miradorrad - 06/29/2012 04:09 PM  
 Need help writing command   - Lunis Orcutt - 06/29/2012 08:05 PM  
 Need help writing command   - Larry Allen - 06/29/2012 11:44 PM  
Keyword
 06/28/2012 05:43 PM
User is offline View Users Profile Print this message

Author Icon
Miradorrad
New Member

Posts: 8
Joined: 04/06/2010

Have a group of Text and Graphics commands.   I open the command and fill in the fields many times a day.  Naturally, upon opening any one of the Text and Graphics commands I would like the first variable field in the text to be highlighted (selected) 'automatically' the moment the text content of the command opens in dication box.

Currently I open the command by voice and then use a mouse hotkey assigned to: Ctrl + Shift + N.

What content can I add to each text and graphic command which will automate the Ctrl + Shift + N and toggle the cursor to select the first variable?

Ideally this would be in Text and Graphics commands, however if that's not possible, would this require converting them over to Advanced Scripting Commands? 





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

Miradorrad

 06/28/2012 05:51 PM
User is offline View Users Profile Print this message

Author Icon
monkey8
Top-Tier Member

Posts: 1987
Joined: 01/14/2008

You can't do this with text and graphics commands, you need to convert to advanced scripting.

Sub Main
 SendSystemKeys "{Ctrl+Shift+n}"
 Wait 0.1
 SendKeys "YOUR TEXT HERE"
End Sub

Lindsay



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


www.pcbyvoice.com
www.pcbyvoice.co.uk

 06/28/2012 07:12 PM
User is offline View Users Profile Print this message


Larry Allen
Advanced Member

Posts: 181
Joined: 09/04/2007

 

I'd do it slightly differently than Lindsay.  If I have a Text & Graphics command named "add stuff" then I'd create an Advanced Scripting command called something like "insert stuff".  That command would insert the "add stuff" text then go to the next field.

 

Sub Main

 HeardWord "add", "stuff"
 Wait .1
 SendSystemKeys "{Ctrl+Shift+n}"

End Sub

 

If you have more than a few of these and they are consistently named, there are ways to avoid having to create a separate Advanced Scripting command for each Text and Graphics macro.



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

Larry Allen
Softnet Systems, Inc.
http://www.pcspeak.com



 06/29/2012 04:09 PM
User is offline View Users Profile Print this message

Author Icon
Miradorrad
New Member

Posts: 8
Joined: 04/06/2010

Lindsay and Larry, thanks!

Larry, I have probably a couple hundred Text and Graphics commands. Each one has a unique name. I like the idea that I would not have to create new AS commands for each, but I still need some help visualizing what to do.

I'd like each of my current T & G commands to work the same magic of Ctrl-Shift-N, to have the first field selected.

Would I be able to trigger an advanced scripting command by embedding something into a T & G command, or would you be suggesting a different solution?

"There are ways..." what would those be?



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

Miradorrad



 06/29/2012 08:05 PM
User is offline View Users Profile Print this message

Author Icon
Lunis Orcutt
Top-Tier Member

Posts: 22580
Joined: 10/01/2006

You could use your existing commands but you would either have to create a couple hundred arguments in a single Advanced Scripting command or about 200 Advanced Scripting commands that issued HeardWord scripts to your previous commands. Either way you do it, there's probably a lot of work involved but it sounds like it would be worth the effort. This is 1 of those areas where a little on-site virtual support might come in handy but it certainly wouldn't take long.



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


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


 


 


 

 06/29/2012 11:44 PM
User is offline View Users Profile Print this message


Larry Allen
Advanced Member

Posts: 181
Joined: 09/04/2007

 

To do this, you'd need a text list of your commands that you wish to treat this way.  Then you'd need a word to add to the commands, either before or after your current command names.  e.g. if they are currently named:

  risk liposuction
  risk face lift
  post op care

Then after this they would be called something like:

  next risk liposuction
  next risk face lift
  next post op care

Then you'd need a different form of the command that I posted... probably something like

Sub Main

Dim engCtrl As New DgnEngineControl
engCtrl.Register
engCtrl.RecognitionMimic (ListVar1)

Wait .1
SendSystemKeys "{Ctrl+Shift+n}"

End Sub

I'd recommend RecognitionMimic because you could use commands with a varying number of words.

Both Lindsay and I have tools to capture your existing command names into a file to make this task easier, others have these tools too.



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

Larry Allen
Softnet Systems, Inc.
http://www.pcspeak.com

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

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