PyAutoGUI, alternative Linux à AutoIt
Mis à jour le
Notre avis
PyAutoGUI is a decent replacement for AutoIt if you're comfortable writing Python and don't need deep Windows-specific automation. It handles mouse, keyboard, and image-based interactions well across Linux, including X11. However, it lacks direct access to window controls and classes like AutoIt's Win* functions. If your workflow relies on manipulating specific UI elements by class or control ID, PyAutoGUI will struggle. It's best suited for simple automation tasks on Linux desktops where image recognition and basic input simulation are enough.
- Licence
- BSD-3-Clause
- Prix
- Gratuit
- Dernière version
- —
- Note
- —
Ce qui fonctionne pareil
- Both automate mouse and keyboard input
- Support conditional logic through their scripting environments
- Can simulate hotkeys and typed input
- Run scripts without a GUI editor
- Include image recognition for locating on-screen elements
Ce qui change
- PyAutoGUI cannot directly interact with window controls or class names like AutoIt
- AutoIt has built-in window management (minimize, wait, close) that PyAutoGUI lacks
- PyAutoGUI relies on image matching for UI targeting, which is less reliable on dynamic interfaces
- AutoIt compiles to standalone executables; PyAutoGUI requires Python runtime
- PyAutoGUI works on Linux, but has limited Wayland support compared to X11
Ouvrir vos fichiers AutoIt
PyAutoGUI cannot open or interpret AutoIt script files (.au3). There is no direct import or conversion tool. You must manually rewrite AutoIt scripts in Python using PyAutoGUI syntax. Some functions may not have equivalents, especially those relying on AutoIt's window control manipulation. Community tools or scripts for translation don't exist in any reliable form.
Passer de AutoIt à PyAutoGUI, étape par étape
- Install Python and pip if not already present
- Install PyAutoGUI with 'pip install pyautogui'
- Rewrite AutoIt logic in Python, replacing Win* functions with image-based waits
- Use pyautogui.locateOnScreen() to find UI elements by screenshot
- Test scripts under X11; expect issues on Wayland
- Add failsafe code (e.g., move mouse to top-left to abort)
Fonctionnalités clés de PyAutoGUI
- Support multiplateforme pour Linux, macOS et Windows
- API simple pour le déplacement, les clics et le défilement de la souris
- Simulation d’entrée clavier incluant les frappes et les raccourcis
- Fonctionnalité de capture d’écran pour prendre des captures du bureau
- Reconnaissance d’image pour trouver et cliquer sur des éléments UI spécifiques
- Fonction fail‑safe qui déplace la souris vers un coin pour annuler les scripts
- Intégration avec d’autres bibliothèques Python pour le traitement de données
Installer PyAutoGUI sous Linux
sudo apt install pyautoguiQuestions fréquentes
Can PyAutoGUI control windows by title or class on Linux?
No, PyAutoGUI cannot directly access window titles or control hierarchies. It relies on image recognition or coordinate-based input, which is less reliable.
Does PyAutoGUI work on Wayland?
Partial. Basic keyboard and mouse functions may work, but screen capture and image recognition often fail under Wayland due to security restrictions.
Is there a GUI editor for PyAutoGUI like AutoIt's SciTE?
No. You must write and run scripts in a Python editor. Some users combine it with IDEs like Thonny or VS Code.