Windows-specific utilities for interactive console, input capture/simulation, and crisp DPI-aware file dialogs
Project description
Alyios Windows Functions
A pure Python package for Windows-specific utilities with zero external dependencies. All functionality is implemented using native Python and Windows API via ctypes.
Features
1. Interactive Console Interface
- Arrow key navigation (↑/↓)
- Visual selection indicators (→)
- Support for lists, dictionaries, and Enums
- Multi-selection with checkboxes
- Confirmation dialogs
- Text input with password masking
2. Mouse & Keyboard Input
Capture:
- Capture mouse clicks with position and button info
- Get current mouse position
- Capture keyboard key presses
- Continuous event listeners for both mouse and keyboard
Simulation:
- Simulate mouse clicks at specific coordinates
- Move mouse cursor programmatically
- Simulate keyboard key presses
- Type text automatically
- Send key combinations (Ctrl+C, Alt+Tab, etc.)
All implemented via Windows API
3. File Dialogs
- Native Windows file selection dialogs
- Folder selection dialogs
- Save file dialogs
- Support for file type filters
- Multi-file selection
Installation
cd AlyiosWindowsFunctions
pip install -e .
Usage Examples
Console Interface
from AlyiosWindowsFunctions import select_option, select_from_list, confirm
# Simple selection with arrow keys
choice = select_option(
"Choose your favorite color:",
["Red", "Green", "Blue", "Yellow"]
)
# Using Enums
from enum import Enum
class Options(Enum):
OPTION_A = "a"
OPTION_B = "b"
choice = select_option("Select option:", Options)
# Multi-selection
items = select_from_list(
"Choose items:",
["Item 1", "Item 2", "Item 3"],
multi=True # Use Space to toggle, Enter to confirm
)
# Yes/No confirmation
if confirm("Continue?", default=True):
print("Confirmed!")
Mouse & Keyboard Input
Capture:
from AlyiosWindowsFunctions import get_click, get_key, get_mouse_position
# Get current mouse position
x, y = get_mouse_position()
print(f"Mouse at: ({x}, {y})")
# Wait for a mouse click
x, y, button = get_click()
print(f"Clicked at ({x}, {y}) with {button} button")
# Wait for a key press
key = get_key()
print(f"You pressed: {key}")
# Continuous event listener
from AlyiosWindowsFunctions import on_click_event
def handle_click(x, y, button, pressed):
if pressed:
print(f"Clicked at ({x}, {y})")
listener = on_click_event(handle_click)
# ... do work ...
listener.stop()
Simulation:
from AlyiosWindowsFunctions import click, move_mouse, press_key, type_text, send_keys
# Simulate mouse click at coordinates
click(500, 300) # Left click
click(500, 300, button='right') # Right click
click(500, 300, clicks=2) # Double-click
# Move mouse cursor
move_mouse(1000, 500)
# Simulate keyboard input
press_key('enter')
press_key('f5')
# Type text automatically
type_text("Hello, World!")
# Send key combinations
send_keys('ctrl+c') # Copy
send_keys('ctrl+v') # Paste
send_keys('alt+tab') # Switch windows
File Dialogs
from AlyiosWindowsFunctions import select_file, select_folder, save_file_dialog
# Select a single file
filepath = select_file(
title="Open File",
filetypes=[("Text files", "*.txt"), ("All files", "*.*")]
)
# Select multiple files
files = select_file(title="Select Files", multiple=True)
# Select a folder
folder = select_folder(title="Choose Directory")
# Save file dialog
filepath = save_file_dialog(
title="Save As",
initialfile="document.txt",
defaultextension=".txt",
filetypes=[("Text files", "*.txt")]
)
Technical Details
No External Dependencies
This package uses only:
- Python standard library (
ctypes,getpass,os,sys,threading,time,enum,typing) - Windows API via
ctypes(user32.dll, kernel32.dll, comdlg32.dll, shell32.dll, ole32.dll)
Windows API Features Used
- Console API: For arrow key input and cursor control
- Low-level hooks: For mouse and keyboard capture
- Common Dialogs: For file/folder selection
- Shell API: For folder browsing
Keyboard Controls
Single Selection:
↑/↓: Navigate optionsEnterorSpace: SelectEsc: Cancel
Multi-Selection:
↑/↓: Navigate optionsSpace: Toggle selectionEnter: Confirm selectionsEsc: Cancel
Running the Demo
cd AlyiosWindowsFunctions
python example.py
The demo showcases all features with interactive examples.
Requirements
- Python 3.7+
- Windows OS (uses Windows-specific APIs)
License
MIT License
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file alyios_windows-0.1.0.tar.gz.
File metadata
- Download URL: alyios_windows-0.1.0.tar.gz
- Upload date:
- Size: 17.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbca83b112e6f5dd4f2781cc7a869d86e6181fb694bf8a209d8b3cd01d879b43
|
|
| MD5 |
354223594f2beb7981173ee9792bfbb2
|
|
| BLAKE2b-256 |
159fd5a03787eb7d406fc2ee2ae6117f35dad8b5ea388d8ec622c68fd7d96fec
|
File details
Details for the file alyios_windows-0.1.0-py3-none-any.whl.
File metadata
- Download URL: alyios_windows-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d36e843502aa1bd35da394112888e564b6342bd903d3800962b528f54d1cee2
|
|
| MD5 |
3ac9e4c027d7c7aa4a5688a89b3559e0
|
|
| BLAKE2b-256 |
a2f1a5c03b90875696bf171eb618e71abd85103ae347ee7f5d01d0179617930c
|