Skip to content

Instantly share code, notes, and snippets.

View drmfinlay's full-sized avatar
🇦🇺

Dane Finlay drmfinlay

🇦🇺
View GitHub Profile
@drmfinlay
drmfinlay / action_bringfileman.py
Created August 2, 2021 13:16
BringFileman: Dragonfly BringApp subclass for file manager applications.
import os
from dragonfly.actions.action_startapp import BringApp
class BringFileman(BringApp):
"""
Dragonfly BringApp subclass for file manager applications.
Explorer.exe usage examples::
@drmfinlay
drmfinlay / _win32_hkl_switch.py
Created December 17, 2020 13:08
Module for working around Dragonfly issues with custom keyboard layouts
"""
This command module automatically posts input language change request
messages to all top-level windows as a workaround for keyboard layouts where
Dragonfly's Win32 key input doesn't work properly.
Use this module by loading it as a Dragonfly command module.
"""
import time
@drmfinlay
drmfinlay / _custom_integers_en_example.py
Last active June 20, 2020 07:10
Custom Dragonfly integer examples
"""
Example using custom English language integers.
"""
from dragonfly import Key, MappingRule, Grammar
from custom_integers_en import MyIntegerRef
rule = MappingRule(
@drmfinlay
drmfinlay / natlink_file_input.py
Created May 31, 2020 14:00
natlink_file_input.py
@drmfinlay
drmfinlay / _test_dragonfly_zh.py
Last active February 12, 2023 06:42
Test Chinese Dragonfly grammar
# coding: utf-8
# (c) Copyright 2020 by Dane Finlay
# Licensed under the LGPL.
"""
This is a simple grammar I put together for testing Dragonfly's Windows
Speech Recognition (WSR) engine with Chinese.
It should work with WSR if you have the Windows display and speech input
@drmfinlay
drmfinlay / _dictation_mode.py
Last active July 5, 2020 13:57
My formatted dictation Dragonfly grammar + related code
"""
Dictation & command mode Dragonfly grammar
============================================================================
This module defines a configurable grammar for using three different
command/dictation modes. The modes can be configured externally by modifying
the number in the grammar's status file. The modes and associated status
numbers (0-2) are defined as follows:
0. Command-only mode.
@drmfinlay
drmfinlay / _dfly_msgboxconfirm_example.py
Created November 22, 2019 13:26
Dragonfly MsgboxConfirm example
# Dragonfly example script using Dragon's MsgBoxConfirm function via
# natlink.execScript().
import natlink
from dragonfly import CompoundRule, MappingRule, Grammar, Key
class DialogExampleRule(CompoundRule):
spec = "open dialog"
@drmfinlay
drmfinlay / _natlink_steak_orange.py
Created September 15, 2019 05:37
Natlink steak orange example
@drmfinlay
drmfinlay / _natlink_thread_example.py
Created September 15, 2019 02:49
Natlink thread example
@drmfinlay
drmfinlay / dfly-loader-natlink.py
Last active July 11, 2019 14:18
Dragonfly command module loader for natlink