Metadata-Version: 2.1
Name: tilia
Version: 1.0.4
Summary: One more layer for pyautogui. Utilities for SAP integration.
Author: ralves-e
Author-email: martins.ruiafonso@gmail.com
Project-URL: code, https://github.com/rafonsomartins/tilia
Project-URL: Example of Usage, https://github.com/rafonsomartins/job_rar/tree/main/Automate%20SAP%20Assessment%20Cycle
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown

This library provides a set of utilities designed to automate repetitive human interactions on a computer. By leveraging the power of the `pyautogui` library, this package allows for easy automation of simple tasks such as mouse movements, clicks, keyboard presses, window focus checks, and clipboard operations. The library is especially helpful in scenarios where you need to automate SAP interactions or other desktop applications without manually repeating actions across different projects.

---

### `SAPAutomation` Class (in `sap_utils.py`)

This class provides an interface for automating SAP tasks, allowing you to perform common actions such as logging into SAP, navigating through menus, and copying data to the clipboard. It uses the `pyautogui_utils` functions to simulate user actions in SAP.

**Example usage:**
```python
from sap_utils import SAPAutomation

sap = SAPAutomation()
sap.login("username", "password")
sap.select_item("item_name")
sap.copy_data()

## Installation

To install the package, simply clone the repository and install the required dependencies:

```bash
git clone https://github.com/yourusername/automation-utils.git
cd automation-utils
pip install -r requirements.txt

## Requirements
- Python 3.x
- pyautogui
- pygetwindow
- pyperclip
- Other dependencies listed in `requirements.txt`

---

## License

This project is licensed under the MIT License.

---

## Next Steps and Potential Vulnerabilities

### Error Handling
Implement structured exception handling (try/except) to ensure better error recovery and debugging.

### Testing
Implement unit tests for all utility functions and mock interactions to allow testing without relying on real-world systems.

### Dynamic Window Titles
Enhance window title-finding logic using regex or partial matches.

### Performance Optimization
Avoid using `time.sleep()` and explore event-driven approaches to improve performance. Ensure that `force_clipboard_content()` doesn't loop infinitely by adding a maximum retry count or exit condition.

### Robustness and Safety
Implement input validation for user inputs and add logging for events and errors to make debugging easier.
