Skip to main content

Write hotkeynet script in Python.

Project description

Documentation Status https://github.com/MacHu-GWU/hotkeynet-project/actions/workflows/main.yml/badge.svg https://codecov.io/gh/MacHu-GWU/hotkeynet-project/branch/main/graph/badge.svg https://img.shields.io/pypi/v/hotkeynet.svg https://img.shields.io/pypi/l/hotkeynet.svg https://img.shields.io/pypi/pyversions/hotkeynet.svg https://img.shields.io/badge/STAR_Me_on_GitHub!--None.svg?style=social
https://img.shields.io/badge/Link-Document-blue.svg https://img.shields.io/badge/Link-API-blue.svg https://img.shields.io/badge/Link-Source_Code-blue.svg https://img.shields.io/badge/Link-Install-blue.svg https://img.shields.io/badge/Link-GitHub-blue.svg https://img.shields.io/badge/Link-Submit_Issue-blue.svg https://img.shields.io/badge/Link-Request_Feature-blue.svg https://img.shields.io/badge/Link-Download-blue.svg

Welcome to hotkeynet Documentation

https://hotkeynet.readthedocs.io/latest/_static/hotkeynet-logo.png

Overview

HotkeyNet 是一个诞生于 2000 年左右, 并在 2009 年停止维护的键盘鼠标自动化软件, 只支持 Windows, 得益于 Windows 强大的兼容性, 它所依赖的底层 Windows API 都没有改动, 所以一直能稳定运行. 万一它真的不能用了, 我会考虑直接用 Windows API 自己实现一个基于 Python 的键盘鼠标自动化软件. 本项目是对 HotkeyNet 脚本用 Python 的二次封装. 使得你可以用更现代的 Python 编程语言来写 HotKeyNet 脚本, 大大提高了项目的可维护性和开发效率.

HotkeyNet 脚本是一个类 XML 语法的 DSL (特定领域编程语言). 基于纯文本, 没有编辑器. 这使得代码复用和动态更改变得极其困难. 虽然它有 Template 语法允许你对文本进行替换, 但由于对 面向对象, If, Else 逻辑的缺失, 使得编程过程极为痛苦, 修改起来也非常麻烦. 不可能做到模块化. 早期我凭借着编程功底, 用 Template 做出来了一个相对可维护的脚本, 但是整个脚本还是极为臃肿. 由于 HotkeyNet 的设计原因, 它解析长脚本的速度极慢, 这使得原生脚本根本不可能适用于复杂多变的项目需求.

这个项目的是用面向对象的语法, 对所有的 Block (代码块) 进行面向对象封装, 然后利用 Python 的类型推断, 自动补全功能, 大大提升了编程效率和编程体验. 避免了记忆原生语法中的那些命令, 而让 IDE 进行自动补全. 而且还能利用各种数据结构批量生成各种代码, 删除无用注释, 大大增加了代码可读性, 复用性和灵活性.

在本项目的加持下, 编写 HotkeyNet 的流程就变成了:

  • 在 Python 中写 HotkeyNet 脚本

  • 运行 Python 生成最终脚本

  • 打开 HotkeyNet 软件并使用该脚本

由于 HotkeyNet 官方网站已经不在了, 本项目在 https://hotkeynet.readthedocs.io/latest/index.html 维护了一个文档的镜像, 以供查阅.

Install

hotkeynet is released on PyPI, so all you need is:

$ pip install hotkeynet

To upgrade to latest version:

$ pip install --upgrade hotkeynet

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hotkeynet-0.1.7.tar.gz (71.1 kB view details)

Uploaded Source

Built Distribution

hotkeynet-0.1.7-py3-none-any.whl (71.8 kB view details)

Uploaded Python 3

File details

Details for the file hotkeynet-0.1.7.tar.gz.

File metadata

  • Download URL: hotkeynet-0.1.7.tar.gz
  • Upload date:
  • Size: 71.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.10

File hashes

Hashes for hotkeynet-0.1.7.tar.gz
Algorithm Hash digest
SHA256 7d462ef4ee3b020e8268ff1b8cffbd96334b02a4270a67f717abb5bd4d12a8e4
MD5 fcccc4fb9bc0dbae6fed7d3126c947e5
BLAKE2b-256 563f1e87db4a66aadc1d42b8ba066f7849f8074e4f43bbc2bd0b68cb69f8a366

See more details on using hashes here.

File details

Details for the file hotkeynet-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: hotkeynet-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 71.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.10

File hashes

Hashes for hotkeynet-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 17064caea68373ab9c78e84546b0782dc21308d5108cdc208102e82b8ab4bdac
MD5 e23521eca02799d3db8fbad7a87617cc
BLAKE2b-256 bbb8441030ebf5c3c5bf6de8d9f02f0096a21e921b50d57be65b5f855adce062

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page