![]() |
KnowBrainer Speech Recognition | ![]() |
Topic Title: Vocola Contextual Commands not working correctly? Topic Summary: -- or maybe my code is suspect Created On: 06/17/2020 04:09 PM Status: Post and Reply |
|
![]() |
![]() |
- spock | - 06/17/2020 04:09 PM |
![]() |
![]() |
- quintijn | - 06/20/2020 07:19 AM |
![]() |
![]() |
- spock | - 06/20/2020 11:58 AM |
![]() |
![]() |
- quintijn | - 06/23/2020 10:47 AM |
![]() |
![]() |
- spock | - 06/23/2020 03:07 PM |
![]() |
![]() |
- quintijn | - 06/25/2020 11:34 AM |
![]() |
![]() |
- spock | - 06/25/2020 12:29 PM |
![]() |
![]() |
- alexander | - 06/26/2020 01:28 PM |
![]() |
![]() |
- quintijn | - 06/26/2020 02:58 PM |
![]() |
![]() |
- spock | - 06/27/2020 03:49 PM |
![]() |
![]() |
- alexander | - 07/19/2020 03:53 AM |
![]() |
![]() |
- quintijn | - 06/29/2020 03:30 AM |
![]() |
![]() |
- mdl | - 07/04/2020 01:14 AM |
![]() |
![]() |
- quintijn | - 07/04/2020 08:45 AM |
![]() |
![]() |
- quintijn | - 07/04/2020 08:48 AM |
![]() |
![]() |
- spock | - 07/04/2020 01:36 PM |
![]() |
![]() |
- mdl | - 01/03/2022 11:41 PM |
![]() |
|
Hi folks. Been following this guidance; http://vocola.net/v2/ContextualCommands.asp I'm using it to create context aware commands on a per-website basis. So within my 'chrome.vcl' file my code reads something like this... google.com: #name of specific website by way of example --bunch of commands I want to work exclusively in this website-- : # to end context sensitivity This works fine to begin with. However the moment I execute a command in the matching website none of my chrome commands work elsewhere. It's as if it becomes locked in that context. The only way to break the context lock is by issuing the instruction 'Load All Commands' Is this a bug or am I simply getting my syntax wrong? Any suggestions would be welcome. Regards |
|
|
|
![]() |
|
Oops, good question. Something to delve into!! Does the window title change with the command you execute?
|
|
|
|
![]() |
|
Hi quintijn. This is all specific to my browser (in this case google chrome). The window title changes according to whichever website i'm on. When I read the guidance for contextual commands I assumed I would be able to exploit this functionality to have certain commands apply uniquely to specific websites (based on their window titles).
The code itself does not change the window title. It merely executes the code within the confines of that website. Apologies if i've misunderstood your question. |
|
|
|
![]() |
|
This works in my browser (apart from MSG command throwing an error, which I will tackle):
KnowBrainer: knowbrainer test = MSG("context knowbrainer"); The command "knowbrainer test" is recognised when the knowbrainer tab is in front. In other tabs it is not recognised. Hope, this is what you mean. |
|
|
|
![]() |
|
Thanks for looking into this for me quintijn. Yes that is exactly what I mean. Did you test it several times to be sure? I only ask because on my setup it works when I first execute the command (on that specific website) but when I move to a different tab all my chrome related commands stop working.
|
|
|
|
![]() |
|
Right, this is a bug. Do you work with the python 2.7 (stable) release, or already with the python 3 version, which can currently be obtained from github? Fixing for python2.7 will not be done any more, for python 3 I can make a bug report.
|
|
|
|
![]() |
|
Thank you quintijn. I am currently using 2.7 but I will make the switch to python 3 soon. I would be happy for you to make a bug report. Your help is greatly appreciated!
|
|
|
|
![]() |
|
The contextual commands have always been a bit finicky. I'm not sure where the issue lies, whether it's in Vocola's code, Natlink or Dragon proper.
In my experience I found it best to put contextual commands in their own file. So for example you have your standard chrome.vcl. You can also have a chrome_website1.vcl, chrome_website2.vcl etc. I found that to be generally more reliable but still not bulletproof. It's also a bit of a pain since you cannot just say "edit commands" to open up those files. ( but if you have a tool like vs code or sublime it's easy enough to open them up there if you open up the Vocola folder) |
|
|
|
![]() |
|
They should be handled by Vocola correct, but they are not. So a good chance to fix this. Your workaround works well, probably, because the changing of contexts within one grammar is not done.
So, Vocola stuff, Natlink and Dragon can handle things properly. |
|
|
|
![]() |
|
That sounds like a great idea alexander, unfortunately I couldn't get it to work. Nevertheless thanks for your reply. |
|
|
|
![]() |
|
Spock please post a sample of your vcl file name(s) and the contents. Your vocola version seems fine. |
|
|
|
![]() |
|
No, this solution should be built in in the vocola internal software. Handling contexts from different Vocola source files should work though, so that is the way to do this now!!
|
|
|
|
![]() |
|
What version of DNS, Vocola, and Natlink are you using?
|
|
|
|
![]() |
|
Output of my Messages from Natlink 11/06/2020: -- (...) natlinkmain started from C:\DT\Natlink\MacroSystem\core: Natlink version: 4.2 DNS version: 15 Python version: 38 Windows Version: 10 Unimacro enabled, UnimacroUserDirectory: C:\Users\Gebruiker\Documents\unimacro_qh Vocola enabled, VocolaUserDirectory: C:\Users\Gebruiker\Documents\vocola_qh ---------------------------------------- And this is the python3 version of Natlink (see at github) or in https://qh.antenna.nl/unimacro/installation/index.html
|
|
|
|
![]() |
|
BTW, nice to "see" you back, Mark!
Greetings, Quintijn |
|
|
|
![]() |
|
Hi mdl. Not sure whether your question was directed at quintijn or myself (as the OP) but FWIW;
DNS version 15.3 Vocola 2.8.6 Natlink 4.2 Additionally I'm running python version 2.7.18 on Windows 10 (with latest update) |
|
|
|
![]() |
|
I have been able to reproduce this with DNS 15, Vocola 2.8.7.
it looks like a Dragon bug, but I need to investigate more. in the meantime, a simple workaround is to put the title specific commands in a separate .vcl file for each context |
|
|
FuseTalk Standard Edition v4.0 - © 1999-2022 FuseTalk™ Inc. All rights reserved.