Skip to main content

window automation package

Project description

pyautomation

pyautomation is a set of Python modules designed to automate the Microsoft Windows GUI, specifically without interacting with the mouse cursor and keyboard. At its simplest, it allows you to post mouse and keyboard events to Windows dialogs and controls.

With the pyautomation package, you can control your GUI automatically while simultaneously controlling the mouse and keyboard physically, similar to how selenium automates web browsers.

Create virtual environment(Recommended)

python -m venv myvenv
source ./myvenv/Scripts/activate

Installation

pip install python-automation

How to use

import os
import time

import pyautomation.msuiauto as auto
import pyautomation.pyauto as pyapp


os.system ('notepad.exe')
time.sleep(5)
window = auto.WindowControl(searchDepth=1, ClassName='Notepad')
pyauto = pyapp.WinAuto(window.Name, "Text Editor")
# pyauto = pyapp.WinAuto(window.Name, "텍스트 편집기")
result, depth = pyauto.walk_and_find(window)
pyauto.type_text(result.NativeWindowHandle, "hello notepad!")

import pyautomation.displayinfo as pydis
print(pydis.DisplayInfo().get_scale_factor(pydis.DisplayInfo().get_Qapp()))
print(pydis.DisplayInfo().get_screen_info())

How to download inspect.exe

Click this git repo or MS Official Website for inspect

How to update PYPI (for only project manager)

Revision codes

  1. Update on Github after modifying codes.

Update version

  1. Update __version__ in __init__.py file in package
  2. Update version in setup.py file (Same setting as first step)
  3. Update after addtion, if install_requires is added in setup.py

Generate whl file

python setup.py sdist bdist_wheel
python setup.py bdist_wheel

Upload whl file

python -m twine upload dist/*
twine upload dist/pyautomation-X.X.X-py3-none-any.whl

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

python-automation-0.5.1.tar.gz (189.4 kB view details)

Uploaded Source

Built Distribution

python_automation-0.5.1-py3-none-any.whl (207.7 kB view details)

Uploaded Python 3

File details

Details for the file python-automation-0.5.1.tar.gz.

File metadata

  • Download URL: python-automation-0.5.1.tar.gz
  • Upload date:
  • Size: 189.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.11

File hashes

Hashes for python-automation-0.5.1.tar.gz
Algorithm Hash digest
SHA256 5c0202b0fe265f904c250e0704716fe682befb5e5cb1168163122ce7565cf555
MD5 228be5dba903c960ebb023d80b0f7d36
BLAKE2b-256 ab4a70423d71dbe94c2661caf4492c6b8163b080d4beba6d69890472d55033f3

See more details on using hashes here.

File details

Details for the file python_automation-0.5.1-py3-none-any.whl.

File metadata

File hashes

Hashes for python_automation-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 24c2961f4692c90c83b59e6d892a535142da041c1b75918843274a62ec14facf
MD5 9d5d17ad0bfc6556a3302998eb5bf1bb
BLAKE2b-256 b0b0126ca5bd6226decb8462f61d0c7d5e54b0d3d7e76100314fec0ea492f693

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