KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: SendKeys or keystrokes do not work in certain applications
Topic Summary:
Created On: 02/09/2022 06:09 AM
Status: Post and Reply
Linear : Threading : Single : Branch
 SendKeys or keystrokes do not work in certain applications   - xxtraloud - 02/09/2022 06:09 AM  
 SendKeys or keystrokes do not work in certain applications   - dilligence - 02/09/2022 07:22 AM  
 SendKeys or keystrokes do not work in certain applications   - xxtraloud - 02/10/2022 04:50 AM  
 SendKeys or keystrokes do not work in certain applications   - Matt_Chambers - 02/09/2022 08:00 AM  
 SendKeys or keystrokes do not work in certain applications   - xxtraloud - 02/10/2022 04:46 AM  
 SendKeys or keystrokes do not work in certain applications   - Matt_Chambers - 02/10/2022 07:52 AM  
 SendKeys or keystrokes do not work in certain applications   - xxtraloud - 02/10/2022 09:59 AM  
 SendKeys or keystrokes do not work in certain applications   - Matt_Chambers - 02/10/2022 10:03 AM  
 SendKeys or keystrokes do not work in certain applications   - xxtraloud - 02/10/2022 10:31 AM  
 SendKeys or keystrokes do not work in certain applications   - Matt_Chambers - 02/10/2022 11:04 AM  
 SendKeys or keystrokes do not work in certain applications   - xxtraloud - 04/25/2022 04:46 AM  
 SendKeys or keystrokes do not work in certain applications   - Matt_Chambers - 04/25/2022 05:42 AM  
 SendKeys or keystrokes do not work in certain applications   - xxtraloud - 04/25/2022 06:07 AM  
 SendKeys or keystrokes do not work in certain applications   - R. Wilke - 04/25/2022 06:08 AM  
Keyword
 02/09/2022 06:09 AM
User is offline View Users Profile Print this message


xxtraloud
Top-Tier Member

Posts: 296
Joined: 12/14/2010

Can someone please tell me why in certain applications when I create a custom command to send a shortcut, the command does not produce any effect but saying for example "press ctrl right" works?

For example I have created an application-specific custom command to move to the next tab in a PDF reader. I tried both the Send Keys and the keystroke but neither works. I have also tried the Advanced Scripting option but nothing works.



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

Win 10 - DPI 15 - AT 8 pro + Andrea USB

 02/09/2022 07:22 AM
User is offline View Users Profile Print this message

Author Icon
dilligence
Top-Tier Member

Posts: 1526
Joined: 08/16/2010

Try SendSystemKeys instead of regular SendKeys or use a Dragon® Step-By-Step command, these turn out to be extremely reliable in some cases!



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

https://speechproductivity.eu


Turbocharge your Dragon® productivity with 40 Power Addons

 02/10/2022 04:50 AM
User is offline View Users Profile Print this message


xxtraloud
Top-Tier Member

Posts: 296
Joined: 12/14/2010

Originally posted by: dilligence Try SendSystemKeys instead of regular SendKeys or use a Dragon® Step-By-Step command, these turn out to be extremely reliable in some cases!

 

This is how I had it set up originally, but it does not work. The strange thing is that I have a global command with step-by-step to press control + tab which works on almost all applications.



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

Win 10 - DPI 15 - AT 8 pro + Andrea USB

 02/09/2022 08:00 AM
User is offline View Users Profile Print this message

Author Icon
Matt_Chambers
Top-Tier Member

Posts: 569
Joined: 08/09/2018

If you show us the script used for Advance Scripting, perhaps we can help you.

In my experience, in DPI 15.61, SendKeys is extremely reliable. In fact, it is at least as reliable as SendSystemKeys.
 02/10/2022 04:46 AM
User is offline View Users Profile Print this message


xxtraloud
Top-Tier Member

Posts: 296
Joined: 12/14/2010

Thank you for the replies. So the SendSystemKeys works but the SendKeys doesn't. Here's my script

'#Language "WWB-COM"

Option Explicit

Sub Main
SendSystemKeys "{ctrl+right}"
End Sub

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

Win 10 - DPI 15 - AT 8 pro + Andrea USB

 02/10/2022 07:52 AM
User is offline View Users Profile Print this message

Author Icon
Matt_Chambers
Top-Tier Member

Posts: 569
Joined: 08/09/2018

for the SendKeys script, are you trying

SendKeys "^{Right}"

?
 02/10/2022 09:59 AM
User is offline View Users Profile Print this message


xxtraloud
Top-Tier Member

Posts: 296
Joined: 12/14/2010

Originally posted by: Matt_Chambers for the SendKeys script, are you trying SendKeys "^{Right}" ?

 

That works Matt, but it seems that SendKeys is slightly slower than SendSystemKeys, or is it just my impression?



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

Win 10 - DPI 15 - AT 8 pro + Andrea USB

 02/10/2022 10:03 AM
User is offline View Users Profile Print this message

Author Icon
Matt_Chambers
Top-Tier Member

Posts: 569
Joined: 08/09/2018

Originally posted by: xxtraloud
Originally posted by: Matt_Chambers for the SendKeys script, are you trying SendKeys "^{Right}" ?

 

 

 

That works Matt, but it seems that SendKeys is slightly slower than SendSystemKeys, or is it just my impression?

 

That's interesting. Conventional wisdom is that SendSystemKeys is much slower than SendKeys, but that wisdom was developed a long time ago. Over the years and versions, people have experimented with testing SendSystemKeys, SendDragonKeys, and SendKeys, and the speed of the three options has changed at times.

Accordingly, it is possible that SendSystemKeys is quicker, but that surprises me. At this point, I use SendKeys whenever possible, but I also use Vocola.

 02/10/2022 10:31 AM
User is offline View Users Profile Print this message


xxtraloud
Top-Tier Member

Posts: 296
Joined: 12/14/2010

Right, I forgot about Vocola. Does it improve the speed of custom commands? I never wanted to go through the hassle of installing it. If it provides easiness of writing commands and speed I might give it a shot, how is your experience with it.

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

Win 10 - DPI 15 - AT 8 pro + Andrea USB

 02/10/2022 11:04 AM
User is offline View Users Profile Print this message

Author Icon
Matt_Chambers
Top-Tier Member

Posts: 569
Joined: 08/09/2018

Originally posted by: xxtraloud Right, I forgot about Vocola. Does it improve the speed of custom commands? I never wanted to go through the hassle of installing it. If it provides easiness of writing commands and speed I might give it a shot, how is your experience with it.

I don't think Vocola is any faster than Advanced Scripting.

The syntax of Vocola, especially keystrokes, is very simple, but of course there is a learning curve, like anything. In addition, to run Vocola, you have to install a particular version of each of Python, Natlink, and Vocola. There can be some complications in doing this. In short, I don't recommend it unless you have some patience and spare time. Don't get me wrong – I like using it, but I don't recommend it for everybody.

 04/25/2022 04:46 AM
User is offline View Users Profile Print this message


xxtraloud
Top-Tier Member

Posts: 296
Joined: 12/14/2010

Matt, unfortunately am still having some problems. Perhaps you have an idea of what the problem is. I have a text editor Sublime Text which I used to write code and then I send this code to a console for executing. When I press control+e the current line is sent to the console but when I use SendKeys "^{e}" than it doesn't work. I know "v" is sent to the console because this function is trying to paste the line into the console, but I think the Dragon script is conflicting somehow with the text editor function to send the code to the console. I'm not sure if this makes any sense.

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

Win 10 - DPI 15 - AT 8 pro + Andrea USB

 04/25/2022 05:42 AM
User is offline View Users Profile Print this message

Author Icon
Matt_Chambers
Top-Tier Member

Posts: 569
Joined: 08/09/2018

Try

SendKeys "^e"

No braces.
 04/25/2022 06:07 AM
User is offline View Users Profile Print this message


xxtraloud
Top-Tier Member

Posts: 296
Joined: 12/14/2010

Thanks for the suggestion, I have tried this but I don't think it's the issue. I still get this message in the console "Error: object 'v' not found". I think the "execute code" function is trying to press ctrl+v and is conflicting with Dragon. It is very strange because this dragon script was working before.

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

Win 10 - DPI 15 - AT 8 pro + Andrea USB

 04/25/2022 06:08 AM
User is offline View Users Profile Print this message

Author Icon
R. Wilke
Top-Tier Member

Posts: 7840
Joined: 03/04/2007

As always, Matt is correct. You only put braces around key names such as F1, enter, etc.

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



No need to buy if all you want to do is try ...

DragonCapture KB Download (Latest)
DragonCapture Homepage

Statistics
32305 users are registered to the KnowBrainer Speech Recognition forum.
There are currently 0 users logged in.
The most users ever online was 12124 on 09/09/2020 at 04:59 AM.
There are currently 459 guests browsing this forum, which makes a total of 459 users using this forum.

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