KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Sharing my script library
Topic Summary: Lots of KB macros shared on GitHub
Created On: 05/13/2021 10:48 AM
Status: Post and Reply
Linear : Threading : Single : Branch
 Sharing my script library   - dparent - 05/13/2021 10:48 AM  
 Sharing my script library   - Matt_Chambers - 05/13/2021 10:53 AM  
 Sharing my script library   - thalon - 05/14/2021 12:11 PM  
 Sharing my script library   - Lunis Orcutt - 05/14/2021 04:40 PM  
 Sharing my script library   - wristofdoom - 05/14/2021 06:44 PM  
 Sharing my script library   - dparent - 05/25/2021 10:44 AM  
 Sharing my script library   - dicdoc - 11/12/2021 07:55 PM  
 Sharing my script library   - dparent - 11/13/2021 12:33 PM  
Keyword
 05/13/2021 10:48 AM
User is offline View Users Profile Print this message

Author Icon
dparent
New Member

Posts: 8
Joined: 08/29/2018

Hi.

I am a longtime user of Dragon and former software engineer.  I have been writing macros and utilities for my personal use with Dragon for quite some time and have amassed a lot of useful stuff.  I have been wanting to share what I have with the community for quite some time and finally have managed to put it all on GitHub with some documentation to help folks figure out how to use it.

Please feel free to take a look at what I have.  If you feel you could benefit from what is there, please feel free to download it and use it.

The code is licensed with the GNU Public License and is made available to you "as is".  I have tried to provide installation instructions and would love to know if folks can get this all to work on their machine, but I do not provide any warranty or guarantees.

As a teaser, I have macros that perform

• line-based editing in editors that don't support select and say

  • • a(nother) mouse grid app
  • • Click By Numbers app
  • • a Memory For Macros utility that lets you save state across macro executions
  • • Kill Dragon cleans up after Dragon crashes without having to reboot
  • • a utility that highlights the currently active window
  • • macros that let you create and use mouse click locations entirely by voice (no need to create separate macros)
  • • command record and playback function
  • • switch to an app by saying any words in the app title
  • • macros for developers wanting to use camel case, under case, etc... 
  • • lots of utility functions
  • formation here:

    https://github.com/dfparent/dragon-tools

    Good luck and let me know how it goes.

oug



 05/13/2021 10:53 AM
User is offline View Users Profile Print this message

Author Icon
Matt_Chambers
Top-Tier Member

Posts: 596
Joined: 08/09/2018

Thank you for sharing! Looks very interesting.
 05/14/2021 12:11 PM
User is offline View Users Profile Print this message

Author Icon
thalon
Senior Member

Posts: 94
Joined: 03/19/2015

Wow, this is really awesome! Thank you so much!
 05/14/2021 04:40 PM
User is offline View Users Profile Print this message

Author Icon
Lunis Orcutt
Top-Tier Member

Posts: 40100
Joined: 10/01/2006

Great Dragon companion commands!



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

Change "No" to "Know" w/KnowBrainer 2020
Trial Downloads
Dragon/Sales@KnowBrainer.com 
(615) 884-4558 ex 1

 05/14/2021 06:44 PM
User is offline View Users Profile Print this message

Author Icon
wristofdoom
Top-Tier Member

Posts: 326
Joined: 09/03/2020

I really want to just get a few of them working as standalones, like camelcase and under case, but they don't seem to work unless I add in all of the dependencies. Any advice for getting these to work on their own without installing every file that gets referenced?

Great library though, thank you for sharing.


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

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

 05/25/2021 10:44 AM
User is offline View Users Profile Print this message

Author Icon
dparent
New Member

Posts: 8
Joined: 08/29/2018

Originally posted by: wristofdoom I really want to just get a few of them working as standalones, like camelcase and under case, but they don't seem to work unless I add in all of the dependencies. Any advice for getting these to work on their own without installing every file that gets referenced? Great library though, thank you for sharing.

Hi wristofdoom!

Probably the easiest thing to do in the long run is to create a C:\Users\Knowbrainer\CommonModules folder and put all the bas files in there.  Then you can simply reference the bas file that contains the function you want in your macro, like

'#Uses "C:\Users\KnowBrainer\CommonModules\utilities.bas"

That way, you don't have to copy anything around and can use any functions you want without extra work and all the references  should work.

There are a few macros that require MemoryForMacros which will take a little more set up, but the instructions are on my GitHub site.  The "camel" and "under case" functions do not need MemoryForMacros, so copying all of the bas files into the new CommonModules ought to do it.

Give it a shot and let me know!

-Doug

 11/12/2021 07:55 PM
User is offline View Users Profile Print this message

Author Icon
dicdoc
Top-Tier Member

Posts: 292
Joined: 07/31/2014

Thanks a lot !

 

I cannnot mange to get these working :

' Save the contents of the clipboard for the current macro run

Public Sub SaveClipboard()

    savedClipboardData = System.Windows.Clipboard.GetDataObject()

End Sub

 

' Restores the previously saved clipboard data for the current macro run

Public Sub RestoreClipboard()

    If Not savedClipboardData Is Nothing Then

        System.Windows.Clipboard.SetDataObject(savedClipboardData)

        savedClipboardData = Nothing

    End If

End Sub

 

I put it all in my own uses reference, to which I added 

 

Imports System.String

Imports System.Collections.Generic

option explicit

 

private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As System.IntPtr, ByRef lpdwProcessId As Integer) As Integer

 

Public Const CURRENT_WINDOW_HANDLE_VALUE = "Menus.CurrentWindowHandle"

Public Const CURRENT_PROCESS_VALUE = "Menus.CurrentProcess"

 

Dim jiraUrl = "https://mc10inc.atlassian.net/browse/"

 

' Location for saving settings in registry

' Starting location is HKEY_CURRENT_USER\ Software\ VB and VBA Program Settings

Dim registryAppName = "..\Douglas Parent\KBCommands"

Dim registrySaveCommand = "SaveCommand"

Dim registryCommandName = "CommandName"

dim registryCommandValues = "CommandValues"

Dim savedClipboardData As Object ' Only saves during a single macro run

 

But I needed to comment it in my editor, otherwise I got an error message.

 

What did I miss, please ? 

 

Thanks



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

Memory: 16GB Microphone Brand and Model: LFH 4000 & Flexy Mike  Operating System: win 10, latest update; Surface Book 2, Processor (CPU) Type & Speed: I7 8650 Soundcard Brand and Model: none Speech Software: Dragon Medical Practice Edition, french version: 4.2 Using KnowBrainer?:Yes

 11/13/2021 12:33 PM
User is offline View Users Profile Print this message

Author Icon
dparent
New Member

Posts: 8
Joined: 08/29/2018

DicDoc,

Glad to see people are using (or trying to use) the macros!

What error message are you seeing?  Also please provide the contents of the macro itself (i.e. the text you enter into the KnowBrainer Command Editor).   Thanks.

 

Statistics
32357 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 344 guests browsing this forum, which makes a total of 345 users using this forum.

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