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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: python-automation-0.5.2.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.2.tar.gz
Algorithm Hash digest
SHA256 29c35750a4c13e8fd22f6dc72ebbf6c7b204ebd06746f95c3c5036b22dd8c292
MD5 2b9c0333ce35f4efad4be8662772f43d
BLAKE2b-256 f3bcb5cce53975e1cddd2c91484cbc451ec3b9aed4f4d2e22e67a7c77dc567b2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_automation-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b06488c9c16329fda634d9629bd73845e90dbee5b44061cb978382247a518386
MD5 f68157c1c571ad2a58b040358232bff4
BLAKE2b-256 5f2aafb1605490091c43ba256a772fbd55bdbc637d0428b71ef350ecfd6a2255

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