KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Strange issue with macro command
Topic Summary: Double-pasting
Created On: 10/27/2019 03:44 AM
Status: Post and Reply
Linear : Threading : Single : Branch
 Strange issue with macro command   - adrienneiii - 10/27/2019 03:44 AM  
 Strange issue with macro command   - dilligence - 10/27/2019 08:48 AM  
 Strange issue with macro command   - Lunis Orcutt - 10/27/2019 11:39 AM  
 Strange issue with macro command   - PG LTU - 10/27/2019 04:03 PM  
 Strange issue with macro command   - adrienneiii - 10/29/2019 04:17 PM  
 Strange issue with macro command   - dilligence - 10/29/2019 05:17 PM  
 Strange issue with macro command   - adrienneiii - 10/30/2019 06:49 PM  
 Strange issue with macro command   - Lunis Orcutt - 10/30/2019 08:56 PM  
 Strange issue with macro command   - Matt_Chambers - 10/30/2019 09:52 PM  
 Strange issue with macro command   - adrienneiii - 11/01/2019 12:58 PM  
Keyword
 10/27/2019 03:44 AM
User is offline View Users Profile Print this message

Author Icon
adrienneiii
New Member

Posts: 6
Joined: 06/30/2015

Hi there, I am using Dragon with some specialized translation software. I open a dictation box in the software, do my thing in there with Dragon, and then I click the Transfer button by saying "Click Transfer", which pastes my text into the main window of the translation software.

So that I can go almost hands-free, I want to have a command that clicks the Transfer button for me. I have recorded a macro command to do this, but the weird thing is that the dictated text pastes in twice. Obviously when I do it without the macro command it's pasted in only once. I have reviewed the macro steps and they seem fine (picture attached, I hope)—I have no idea why it would paste twice.

Can anyone help? Thanks!

 

 

 10/27/2019 08:48 AM
User is offline View Users Profile Print this message

Author Icon
dilligence
Top-Tier Member

Posts: 1036
Joined: 08/16/2010

Are you using the default Dragon Dictation box? You could try a very simple SendSystemKeys command depending on the Tab order of the Transfer button of the Dragon box (probably 3). You could then give it the exact same name as the button label because the voice command name will take precedence:

 

Transfer

 

SendSystemKeys "{Tab 3}"

SendSystemKeys "{Enter}"

 

With the SP Dictation Boxes you have the additional option to use the "Transfer Now" command which bypasses the TRANSFER button but still transfers your text to the target application.

 

SP also gives you a third option to transfer the text by pressing the TRANSFER (and CANCEL) button by means of an external executable. This makes it even easier to program these buttons in (lengthy) DVC command scripts.

 

Then of course there's the somewhat clunky "if all else fails" solution by using any dictation box or text editor as a simple text holder:

 

SendSystemKeys "{Ctrl+a}"

SendSystemKeys "{Ctrl+x}"

SendSystemKeys "{Alt+F4}"

SendSystemKeys "{Ctrl+v}"



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

www.speechproductivity.eu 


The Ultimate Dictation Box for Dragon - SP Ergonomic Text Editor - Hotkeys for Dragon - Better Text to Speech - Easy Guide to Dragon Scripting



 10/27/2019 11:39 AM
User is offline View Users Profile Print this message

Author Icon
Lunis Orcutt
Top-Tier Member

Posts: 37356
Joined: 10/01/2006

Our 1st recommendation would be to NEVER use Dragon's Macro Recorder. It is a toy just waiting to malfunction and even in the best situation, it will deploy in real-time which is about as slow as watching paint dry.

 

Our 1st question is why didn't you stick with saying click transfer which appears to be doing exactly what you want? If you wish to create a shorter version, rather than using Dragon recorder, try creating an Advanced-Scripting command. However, if you are using a specialized Dictation Box, that is included in your translation utility, find out what the hotkey is and create a script such as the following, which would be designed for the Dragon Dictation Box. You may have to replace the "t" in the following script, for your transcription utility. Also note that when you create a Dragon Advanced-Scripting command (VBA), Sub Main & End Sub are created automatically. All you need is the middle line.

Sub Main

SendKeys "%t"

End Sub



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

Forum Mission Statement
Trial Downloads
Dragon/Sales@KnowBrainer.com 
(615) 884-4558 ext 1



 10/27/2019 04:03 PM
User is offline View Users Profile Print this message

Author Icon
PG LTU
Top-Tier Member

Posts: 1934
Joined: 03/21/2007

Or even better, use SendSystemKeys which is more and more reliable the more unfriendly to Dragon your translation application might be.

Sub Main
    SendSystemKeys "{Alt+t}"
End Sub


Hth,



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




PG





Remember folks, my comments and this forum are for entertainment value only, please, no wagering or other reliance on the contents herein.  I permit no commercial use of my ideas (whether expressions or embodiments) without my written consent.



 10/29/2019 04:17 PM
User is offline View Users Profile Print this message

Author Icon
adrienneiii
New Member

Posts: 6
Joined: 06/30/2015

Thanks so much for all these replies, which I only just found in my spam folder!

Liking the SendKeys solution, which I tried first, and it works really well.
Saying "Click Transfer" is a bit of a pain actually compared to the word I'm using (I have to say it every few seconds bear in mind), but in addition I'd now like to add in another step, which is to press Ctrl-Down (which moves me to the next segment in my translation file). Could one of you tell me what command I should include after SendKeys to do that?
Thanks so much!
 10/29/2019 05:17 PM
User is offline View Users Profile Print this message

Author Icon
dilligence
Top-Tier Member

Posts: 1036
Joined: 08/16/2010

Advanced Scripting:

 

SendKeys "^{Down}"

 

 

DVC Script:

 

SendKeys "{Ctrl+Down}"

 

You may need to use SendSystemKeys instead of SendKeys



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

www.speechproductivity.eu 


The Ultimate Dictation Box for Dragon - SP Ergonomic Text Editor - Hotkeys for Dragon - Better Text to Speech - Easy Guide to Dragon Scripting



 10/30/2019 06:49 PM
User is offline View Users Profile Print this message

Author Icon
adrienneiii
New Member

Posts: 6
Joined: 06/30/2015

Thanks dilligence, I don't know why but this isn't working:

Sub Main
SendKeys "%t"
SendKeys "^{Down}"

End Sub

For some reason it does Ctrl down FIRST, and paste afterwards. Can't imagine why that would be. Switching it around doesn't work of course.

Any further ideas? Appreciate it! If you think I should use SendSystemKeys, I'd be really grateful if you could guide me as to the whole script.
 10/30/2019 08:56 PM
User is offline View Users Profile Print this message

Author Icon
Lunis Orcutt
Top-Tier Member

Posts: 37356
Joined: 10/01/2006

Try the following 3:

 

Sub Main

SendKeys "%t"

Wait 1

SendKeys "^{Down}

End Sub


or


Sub Main

HeardWord "click,"tranfer"

Wait 1

SendKeys "^{Down}

End Sub


or


Sub Main

HeardWord "click,"tranfer"

Wait 1

HeardWord "press,"control","down"

End Sub



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

Forum Mission Statement
Trial Downloads
Dragon/Sales@KnowBrainer.com 
(615) 884-4558 ext 1

 10/30/2019 09:52 PM
User is offline View Users Profile Print this message

Author Icon
Matt_Chambers
Senior Member

Posts: 156
Joined: 08/09/2018

Originally posted by: adrienneiii Thanks dilligence, I don't know why but this isn't working: Sub Main SendKeys "%t" SendKeys "^{Down}" End Sub For some reason it does Ctrl down FIRST, and paste afterwards. Can't imagine why that would be. Switching it around doesn't work of course. Any further ideas? Appreciate it! If you think I should use SendSystemKeys, I'd be really grateful if you could guide me as to the whole script.

Why not try:

SendKeys "%t",1

SendKeys "^{Down}"

 

The ",1" at the end of line 1 is supposed to ensure that that line of code executes before the next line.

 11/01/2019 12:58 PM
User is offline View Users Profile Print this message

Author Icon
adrienneiii
New Member

Posts: 6
Joined: 06/30/2015

Thanks so much to all of you, dilligence's first solution seems to have worked a treat, but I'll keep the others in store in case anything goes wrong!
Statistics
31556 users are registered to the KnowBrainer Speech Recognition forum.
There are currently 1 users logged in.
The most users ever online was 3936 on 09/08/2015 at 11:44 AM.
There are currently 321 guests browsing this forum, which makes a total of 322 users using this forum.

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