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
 11/12/2021 07:55 PM
User is offline View Users Profile Print this message

Author Icon
dicdoc
Top-Tier Member

Posts: 298
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: 10
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
32634 users are registered to the KnowBrainer Speech Recognition forum.
There are currently 2 users logged in.
The most users ever online was 12124 on 09/09/2020 at 04:59 AM.
There are currently 208 guests browsing this forum, which makes a total of 210 users using this forum.

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