![]() |
KnowBrainer Speech Recognition | ![]() |
Topic Title: [Solved] Replacing Selection using Regular Expression Topic Summary: TL;DR let an external program handle it Created On: 03/11/2019 01:01 PM Status: Post and Reply |
|
![]() |
![]() |
- locution | - 03/11/2019 01:01 PM |
![]() |
![]() |
- locution | - 03/11/2019 01:55 PM |
![]() |
![]() |
- locution | - 03/20/2019 06:42 PM |
![]() |
![]() |
- R. Wilke | - 03/20/2019 08:24 PM |
![]() |
![]() |
- locution | - 03/21/2019 12:08 PM |
![]() |
![]() |
- Lunis Orcutt | - 03/21/2019 12:24 PM |
![]() |
![]() |
- R. Wilke | - 03/21/2019 01:13 PM |
![]() |
![]() |
- locution | - 03/21/2019 07:06 PM |
![]() |
|
Howdy, I started reading the Nunce Advanced Scripting page but am having trouble understanding to what extent VBA is supported. I made a simple script that uses the selected text, and verified that I can add something to it. But when I try a simple Regex.Replace() with it, the script editor growls. Can someone please point me to what I'm missing? Also am I looking at the wrong scripting manual? Sub Main Rem THIS FAILS even though it is correct VBA
|
|
|
|
![]() |
|
For the record, I was able to do it using AutoHotkey, but I hope there is a more direct way to do it directly in Dragon VBA. Here is my current solution for anyone on the same track. 1. Dragon Command Sub Main
2. AutoHotkey key binding #IfWinActive ahk_exe EditPadPro7.exe GetSelectedText() { |
|
|
|
![]() |
|
Should I assume, from the lack of replies, that there is no way to do this natively?
|
|
|
|
![]() |
|
You are expecting Dragon Advanced Scripting to do things it wasn't designed for. Even in my C++ programs, I need to include regex.h if I want to use regular expressions. Maybe you could link to a specific DLL in Advanced Scripting to achieve this, however.
-------------------------
|
|
|
|
![]() |
|
Thank you, that makes a lot of sense. |
|
|
|
![]() |
|
You might consider Larry Allen's Scripting for Dragon ------------------------- Change "No" to "Know" w/KnowBrainer 2020 |
|
|
|
![]() |
|
If Dragon Advanced Scripting is essential to you, you should definitely get Larry Allen's guide. It may not teach you many new things, but it covers all the basics, and then adds some nice and really useful details. In native Dragon Advanced Scripting, you can also reference many object libraries which are currently installed on the system. To do so, start an Advanced Scripting and put the cursor into the editor, then press the Alt key + Enter, and wait long enough for the list to populate. Not sure if there is a path to get to referencing the RegEx API this way.
Finally, if you have the KnowBrainer software, you can do VB.NET scripting right off the bat. -------------------------
|
|
|
|
![]() |
|
Thank you both for your thoughts. After unsuccessfully experimenting with DLLcall, I found a suggestion on this thread that sounds like it will solve the problem. > why don't you just create a .net executable with command line arguments to call the different functions, that will work in exactly the same way and you can then run it using ShellExecute within an advanced script. Will explore some more later this week and update. |
|
|
FuseTalk Standard Edition v4.0 - © 1999-2022 FuseTalk™ Inc. All rights reserved.