Skip to main content

项目介绍

Project description

SimpleWin32 简单使用pywin32框架

安装

pip install simplewin32

引用

from SimpleWin32.simplewin32 import *

可使用对象

KeyCode

快捷使用键盘字符码

MouseEvent

鼠标的左右中键的点击事件定义

Mouse

进行鼠标操作的类,可以使用方法链的形式进行调用

  • move: 鼠标移动
  • roll: 鼠标滚动
  • 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模糊搜索窗口句柄

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.4.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

SimpleWin32-0.1.4-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file SimpleWin32-0.1.4.tar.gz.

File metadata

  • Download URL: SimpleWin32-0.1.4.tar.gz
  • Upload date:
  • Size: 9.6 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

Hashes for SimpleWin32-0.1.4.tar.gz
Algorithm Hash digest
SHA256 ad97fa718fc28683d45aa6738b52190d59dbddc7dd758a79469c35bd50254423
MD5 9ca5164a69009823dfb15f7bf68b6ba2
BLAKE2b-256 e5d8c3f5af4f91b5a9c7b62cb221989d0ec7db18c5fd3fdc4cc159e4b2ac7809

See more details on using hashes here.

File details

Details for the file SimpleWin32-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: SimpleWin32-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 9.6 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

Hashes for SimpleWin32-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e1faf95bd3ac8570505ad3754010786f2b4b79671131f3cc936e264199981e7e
MD5 6c445b4b31b04dfa3d5cadbd4906ae6e
BLAKE2b-256 54c533569814884ea027cf71e4926420db0e1913604360f7ba00edb957a5de7e

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