![]() |
KnowBrainer Speech Recognition | ![]() |
Topic Title: Autohotkey Script to Close Dragon without Saving the User Profile and Restarts Topic Summary: Created On: 12/10/2019 12:39 PM Status: Post and Reply |
|
![]() |
![]() |
- Rapp | - 12/10/2019 12:39 PM |
![]() |
![]() |
- PG LTU | - 12/11/2019 11:43 AM |
![]() |
![]() |
- Edgar | - 12/11/2019 07:13 PM |
![]() |
![]() |
- dilligence | - 12/11/2019 08:07 PM |
![]() |
![]() |
- Rapp | - 12/12/2019 01:36 PM |
![]() |
![]() |
- dilligence | - 12/12/2019 04:43 PM |
![]() |
![]() |
- Lunis Orcutt | - 12/12/2019 02:07 PM |
![]() |
|
I have attached a Autohotkey script that closes the current user profile without saving, exits Dragon, and then starts Dragon again. You can also execute the script from Advanced Scripting in Dragon: ShellExecute "FullScriptPathandName" If anyone has enhancements to the script, please let me know. |
|
|
|
![]() |
|
You might consider closing DragonBar.exe too separately. And even the logging service or UI automation servers (dgnuiasvr.exe and _64), etc. Someone here wrote a batch file which works well (and can be run directly or executed by a script).
-------------------------
|
|
|
|
![]() |
|
With recent changes to KnowBrainer the batch file had to be "run as administrator" (at least on my Windows 10 machine). I started exploring workarounds. One version is to create a shortcut to the batch file on the Desktop and change the shortcut’s property so that it runs as administrator. I did not have great success with this although it sometimes work. I finally wrote a tiny C# application in Visual Studio 2017: using System.Diagnostics; using System.Threading;
namespace KillDragon { class Program { static void Main(string[] args) { // PIDs EndProcessTree("KBPro.exe"); //5264 Thread.Sleep(2000);//sleep 2 seconds EndProcessTree("ProcHandler.exe"); //9864 //EndProcessTree("KBProcHandler.exe"); //EndProcessTree("pcbvWndProc1928.exe"); Thread.Sleep(1000);//sleep 1 second EndProcessTree("dragonbar.exe"); //18008 EndProcessTree("dgnuiasvr.exe"); //12644 EndProcessTree("dgnuiasvr_x64.exe"); //700 EndProcessTree("dgnsvc.exe"); //10500 EndProcessTree("natspeak.exe"); //18088 //EndProcessTree("formfiller.exe"); //EndProcessTree("dgnria_nmhost.exe"); //EndProcessTree("nsbrowse.exe"); //the commented out trees are from older versions and helpers }
private static void EndProcessTree(string imageName) { Process.Start(new ProcessStartInfo { FileName = "taskkill", Arguments = $"/im {imageName} /f /t", CreateNoWindow = true, UseShellExecute = false }).WaitForExit(); } }
} As with the batch file it has a tendency to leave the icons in the tray (a minor irritation but no impediment to restarting KnowBrainer and/or Dragon). I've experimented around with solutions for clearing these icons from the tray and I suspect that I am fairly close to a solution but the visual irritation is not enough to spur me on to finding a solution.
------------------------- -Edgar |
|
|
|
![]() |
|
SP Pro performs all necessary operations including cleaning up the Dragon/KB/VC/SS+ ghost icons with one single Hotkey (Ctrl+Alt+Down). If speech is still available you can also use a voice command.
No need to create any scripts. However cleaning up the ghost icons will only work of course if you have the "Always show icons in the notification area" set to On. Which is recommended anyway if you want to see what's going on on your computer.
Here's an example of quickly restarting Dragon + VC. ------------------------- Auto Box - SP Editor - HyperNotes - Hotkeys for Dragon - Quick Correct - Press Utility - Easy Guide to Dragon Scripting |
|
|
|
![]() |
|
With respect to SP Pro, does the process close the user profile or simply kill the process? I don't want the user profile to be damaged, and so I prefer closing and not saving to minimize the chance of damage to the profile. |
|
|
|
![]() |
|
Rapp,
The Dragon and VC (+KB + SS+) Restart utility kills these processes, cleans up orphan icons and (optionally) relaunches these add-ons. It's mostly meant if Dragon has become unresponsive/unstable and voice commands don't work anymore. In these cases you probably don't want to save your user profile anyway
You can also use the tool if you are in a lazy mood ;-). If none of the above add-ons are currently running it will restart just Dragon (so it's not a condition to have these add-ons installed in order to run the utility).
The user can choose one of the following combinations: Dragon + VC Restart or Dragon + KB + SS+ Restart. I could combine all into one but that wouldn't make much sense since those who use VC usually don't use SS+ and combining VC with KB is not always a good idea. ------------------------- Auto Box - SP Editor - HyperNotes - Hotkeys for Dragon - Quick Correct - Press Utility - Easy Guide to Dragon Scripting |
|
|
|
![]() |
|
If you kill the Dragon process, you will not damage your user profile but assuming you are using KnowBrainer, all you have to do is say Close Dragon and KnowBrainer to immediately shut down Dragon and KnowBrainer, without saving your profile. Since this is a mission-critical command, you are prompted before the command will take effect. ------------------------- Forum Mission Statement |
|
|
FuseTalk Standard Edition v4.0 - © 1999-2021 FuseTalk™ Inc. All rights reserved.