KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: How can I copy all the commands for Google Chrome to also apply for a another web browser?
Topic Summary:
Created On: 09/09/2020 11:13 AM
Status: Post and Reply
Linear : Threading : Single : Branch
Keyword
 09/09/2020 11:13 AM
User is offline View Users Profile Print this message

Author Icon
wristofdoom
Power Member

Posts: 58
Joined: 09/03/2020

I use many different browsers, including the Brave web browser, which is chrome based. The keyboard commands for brave are virtually identical to the keyboard commands for Google Chrome. However, in the KB, brave does not have any application commands.

 

I want to duplicate the list of commands used for Google Chrome and have them also apply to Brave. What's the best way to do this?

 

I don't see an option for copying a large amount of commands from one application to another within the KB user interface.

 

So I started looking around in the KB program files for a command file. I found the file List of commands. I found the "MyKBCommands.xml" but this does not seem to have the Google Chrome or Microsoft edge commands that I am looking to copy.

 

Can you recommend the best way to do this?

 

Do I need to save my custom commands in the "MyKBCommands.xml" file in order to avoid being overwritten by the next KB update?

 

Thanks



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

Dragon Professional Individual v15.6. Windows 10. Knowbrainer 2017.

 09/09/2020 03:16 PM
User is offline View Users Profile Print this message

Author Icon
Lunis Orcutt
Top-Tier Member

Posts: 37978
Joined: 10/01/2006

This ability is not included in the current KnowBrainer release so you would literally have to copy 1 command at a time. Of course, that's another good reason why we are releasing VB II in advance of KnowBrainer 2021, as previously intended. Consider copying your Google commands into Dragon rather than KnowBrainer. Most KnowBrainer commands can be copied into Dragon without editing and Dragon is now completely supported by KnowBrainer VB II. This will allow you to import future KnowBrainer incremental Builds without having to export and import your personal commands. Of course this will all change when KnowBrainer 2021 is released. This maneuver is easier than you think because you can open each KnowBrainer command and create Dragon commands via WYSWYS (What You See Is What You Say). Just copy the commands you really want. HOWEVER, it would be much easier to simply switch to Microsoft Edge and forgetting about Google Chrome and Brave. KnowBrainer already has better support for Microsoft Edge because it has more capabilities for KnowBrainer to take advantage of; like being able to say Go to <dictation> to go to open websites. 



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

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

 09/10/2020 10:49 AM
User is offline View Users Profile Print this message

Author Icon
Edgar
Top-Tier Member

Posts: 909
Joined: 04/03/2009

Originally posted by: wristofdoom  I want to duplicate the list of commands used for Google Chrome and have them also apply to Brave. What's the best way to do this?

This can be done, but the process easily leads to a temporarily-broken KnowBrainer!


It appears that you have already located the KnowBrainer commands file in this folder:

C:\Users\<User>\AppData\Roaming\KnowBrainer\KnowBrainerCommands

(where <User> is replaced by your username). It is called: MyKBCommands.xml; in the same location you will see a folder called AutomaticBackups/, KnowBrainer makes a copy of its command file every fifth time you make a change - you may always look at these if you lose a long-standing command.


BEFORE DOING ANYTHING ELSE… make a copy of your MyKBCommands.xml file! It's quite easy to break this file; if you do KnowBrainer will fail to operate.


Open up the MyKBCommands.xml file in your favorite programming editor (I use PSPad -it is free and quite powerful). Open up your editor's search dialog and search for the following term:

<Commands scope="

If your editor allows you to "list all", do so; otherwise keep searching forward until you find a line that looks like:

<Commands scope="application" module="chrome" company="Google Inc." moduleDescription="Google Chrome">

Either way, once you get to the "Commands scope" section devoted to Chrome you will want to select everything from the beginning of the "Commands scope" line until the end of the very last line in the section - you will see another line that starts with:

<Commands scope=

the last line will look like:

</Commands>

Copy all of that inclusively and paste it somewhere in a new temporary text file this should look something like:

<Commands scope="application" module="chrome" company="Google Inc." moduleDescription="Google Chrome">

[… XML code for all of your chrome commands …]

</Commands>

each command will look something like:

    <Command name="Read Last" group="" enabled="true">

      <description></description>

      <content type="WinWrap Basic"><![CDATA[

Sub Main

   SendKeys "{End}", 1

   Wait 0.5

   SendKeys "{PgUp}", 1

End Sub

]]></content>

    </Command>


Now, temporarily close the editor which contains your MyKBCommands.xml file (it's going to change and you need to reopen the file after it does - some programmer's editors would allow you to keep the file open, notify you that the file had been changed outside the editor and ask you if you wish to refresh/reload - it's okay to do it that way if you're comfortable with it). Next, open up the browser does NOT chrome (Brave etc.) and create an application-specific command - it need not have any statements, it's just temporary, you can name it Test or anything else. After saving the newly created application-specific command reopen your MyKBCommands.xml file; follow the same search procedure above to find the new "<Commands scope=" which pertains to the browser you are now working with (you could give that temporary command some extremely unique name and search for that - scope section line would be immediately above). Now, take a look at the scope line for Chrome IN THE NEWLY SAVED TEXT FILE (again it looks like:)

<Commands scope="application" module="chrome" company="Google Inc." moduleDescription="Google Chrome">

you will need to change that line so that it matches the scope line for the browser on which you are working; it might look something like:

<Commands scope="application" module="brave" company="Brave Inc." moduleDescription="Brave">

I do not have the Brave browser so I don't know exactly what it will look like. I had no Edge application-specific commands so I followed the above procedure and got this:

  <Commands scope="application" module="msedge" company="Microsoft Corporation" moduleDescription="Microsoft Edge">

    <Command name="TESTING the Edge Browser" group="" enabled="true">

      <description></description>

      <content type="WinWrap Basic"><![CDATA[Sub Main


End Sub

]]></content>

    </Command>

  </Commands>

One at a time, for each Chrome-based browser, edit that NEWLY SAVED TEXT FILE’s first line so it pertains to the appropriate browser - no need to save anything. Copy the entire contents of that NEWLY SAVED TEXT FILE and PASTE it over the entire scope section for the Chrome-based browser. This will wipe out the test temporary command and any commands that already exist for that browser. If you have already created commands for the browser and you wish to save them the process will be a little more complex and mistakes much easier to make! Unless there are a lot of them I would suggest going ahead and wiping them out then re-creating them using Cut-and-Paste based on the contents of that copy of the MyKBCommands.xml that you made as a critical first step.


If you break the 

It appears that you have already located the KnowBrainer commands file in this folder:

C:\Users\<User>\AppData\Roaming\KnowBrainer\KnowBrainerCommands

(where <User> is replaced by your username). It is called: MyKBCommands.xml; in the same location you will see a folder called AutomaticBackups/, KnowBrainer makes a copy of its command file every fifth time you make a change - you may always look at these if you lose a long-standing command.


BEFORE DOING ANYTHING ELSE… make a copy of your MyKBCommands.xml file! It's quite easy to break this file; if you do KnowBrainer will fail to operate.


Open up the MyKBCommands.xml file in your favorite programming editor (I use PSPad -it is free and quite powerful). Open up your editor's search dialog and search for the following term:

<Commands scope="

If your editor allows you to "list all", do so; otherwise keep searching forward until you find a line that looks like:

<Commands scope="application" module="chrome" company="Google Inc." moduleDescription="Google Chrome">

Either way, once you get to the "Commands scope" section devoted to Chrome you will want to select everything from the beginning of the "Commands scope" line until the end of the very last line in the section - you will see another line that starts with:

<Commands scope=

the last line will look like:

</Commands>

Copy all of that inclusively and paste it somewhere in a new temporary text file this should look something like:

<Commands scope="application" module="chrome" company="Google Inc." moduleDescription="Google Chrome">

[… XML code for all of your chrome commands …]

</Commands>

each command will look something like:

    <Command name="Read Last" group="" enabled="true">

      <description></description>

      <content type="WinWrap Basic"><![CDATA[

Sub Main

   SendKeys "{End}", 1

   Wait 0.5

   SendKeys "{PgUp}", 1

End Sub

]]></content>

    </Command>


Now, temporarily close the editor which contains your MyKBCommands.xml file (it's going to change and you need to reopen the file after it does - some programmer's editors would allow you to keep the file open, notify you that the file had been changed outside the editor and ask you if you wish to refresh/reload - it's okay to do it that way if you're comfortable with it). Next, open up the browser does NOT chrome (Brave etc.) and create an application-specific command - it need not have any statements, it's just temporary, you can name it Test or anything else. After saving the newly created application-specific command reopen your MyKBCommands.xml file; follow the same search procedure above to find the new "<Commands scope=" which pertains to the browser you are now working with (you could give that temporary command some extremely unique name and search for that - scope section line would be immediately above). Now, take a look at the scope line for Chrome IN THE NEWLY SAVED TEXT FILE (again it looks like:)

<Commands scope="application" module="chrome" company="Google Inc." moduleDescription="Google Chrome">

you will need to change that line so that it matches the scope line for the browser on which you are working; it might look something like:

<Commands scope="application" module="brave" company="Brave Inc." moduleDescription="Brave">

I do not have the Brave browser so I don't know exactly what it will look like. I had no Edge application-specific commands so I followed the above procedure and got this:

  <Commands scope="application" module="msedge" company="Microsoft Corporation" moduleDescription="Microsoft Edge">

    <Command name="TESTING the Edge Browser" group="" enabled="true">

      <description></description>

      <content type="WinWrap Basic"><![CDATA[Sub Main


End Sub

]]></content>

    </Command>

  </Commands>

One at a time, for each Chrome-based browser, edit that NEWLY SAVED TEXT FILE’s first line so it pertains to the appropriate browser - no need to save anything. Copy the entire contents of that NEWLY SAVED TEXT FILE and PASTE it over the entire scope section for the Chrome-based browser. This will wipe out the test temporary command and any commands that already exist for that browser. If you have already created commands for the browser and you wish to save them the process will be a little more complex and mistakes much easier to make! Unless there are a lot of them I would suggest going ahead and wiping them out then re-creating them using Cut-and-Paste based on the contents of that copy of the MyKBCommands.xml that you made as a critical first step.


If you break the MyKBCommands.xml file (typically KnowBrainer fails to run) you can always get back to where you were by deleting that broken file and replacing it with the copy that you made as a critical first step.

 



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

-Edgar
DPI 15.3, 64-bit Windows 10 Pro, OpenOffice & Word 365, Norton Security, Shure X2U XLR to USB mic adapter with Audio Technica DB135 vocal mic, Asus X299-Deluxe Prime, Intel Core i9-7940X (14 core, 4.3 GHz overclocked to 4.9 GHz), G.SKILL TridentZ Series 64GB (4 x 16GB) DDR4 3333 (PC4 26600) F4-3333C16Q-64GTZ, NVIDIA GIGABYTE GeForce GTX 1060 GV-N1060G1 GAMING-6GD REV 2.0 6GB graphics card

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

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