项目介绍
Project description
SimpleWin32 简单使用pywin32框架
安装
pip install simplewin32
引用
from SimpleWin32.simplewin32 import *
可使用对象
KeyCode
快捷使用键盘字符码
MouseEvent
鼠标的左右中键的点击事件定义
Mouse
进行鼠标操作的类,可以使用方法链的形式进行调用
- move: 鼠标移动
- roll: 鼠标滚动
- mouse_position: 获取当前鼠标位置
- click: 前台鼠标点击
- bg_Click: 后台点击
Keyboard
键盘事件的操作类
- click: 点击
- press: 按下
- release: 松开
- bg_Click: 后台点击
Message
进行输入、弹窗等文字类的操作,包含弹窗的基本类型
- InputMessage: 输入文字
- AlertMessage: 弹出信息框
- SetText: 窗口设置文字
ClipBoard
粘贴板设置和获取值操作类
- SetClipboard: 设置粘贴板文字
- GetClipboard: 获取粘贴板文字
Window
集合以及二次封装了窗口方法,便捷获取窗口信息、枚举窗口句柄等操作
- GetSystemMetrics: 获取屏幕尺寸
- GetDeviceCaps: 获取屏幕分辨率
- ComputerDeviceScale: 计算设备缩放比
- GetAllWindows: 获取所有的窗口或一级子窗口
- FindWindow: 搜索窗口
- GetWindowInfo: 获取窗口class、title
- MoveOrResizeWindow: 设置窗口大小和位置
- ShowWindow: 显示窗口
- GetCurrentWindow: 获取当前窗口句柄值以及title和class
- GetWindowRect: 获取窗口坐标位置
- MarkChildWindow: 标记窗口句柄位置(需要numpy、opencv和pillow库支持)
- FuzzySearchWindow: 通过class和窗口title模糊搜索窗口句柄
Voice
声音模块
- Speak: 将文字转换为电脑语音朗读,调用本地电脑api
Custom
封装了一些常用的窗口操作方法:
- UploadFile: 文件上传操作
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
SimpleWin32-0.1.5.tar.gz
(10.5 kB
view details)
Built Distribution
File details
Details for the file SimpleWin32-0.1.5.tar.gz
.
File metadata
- Download URL: SimpleWin32-0.1.5.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e70ce80d8b0796b704b32910713505019b85e057972628c0194991f77acdf0e7 |
|
MD5 | 9fee5a4e6d03d3b9cdc7fba087459b7c |
|
BLAKE2b-256 | a6eb84fcdbb9b057e257900c6f17b766a307c82c0141aceae9a0ac43070e520f |
File details
Details for the file SimpleWin32-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: SimpleWin32-0.1.5-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dde2b84baf0bec3aacdd4854cb134fa1e4226a765fca96355376188272d8a3f5 |
|
MD5 | ffbae4157e429bafcfd520ddea75810b |
|
BLAKE2b-256 | 17e9a47bcf93594bdad497eeeae048272a2c0901b1c7dc9e30f995b9b6166822 |