OooDev GUI Automation for Windows
Although the LibreOffice API gives access to many parts of the LibreOffice application, it does not give access to everything. This project is an extension that allows access to the GUI. This project a set of python modules to automate the LibreO
latest release: 2024-03-21 21:45:47
Description
Introduction
Although the LibreOffice API gives access to many parts of the LibreOffice application, it does not give access to everything. This project is an extension that allows access to the GUI. This project a set of python modules to automate the LibreOffice GUI. At its simplest it allows you to send mouse and keyboard actions to windows dialogs and controls.
ooo-dev-tools-gui-win python package can be pip installed; However, this can be cumbersome that is the reason for this project. See Pip & Virtual Environments.
This project uses ooo-dev-tools-gui-win, ooo-dev-tools (OooDev) and pywinauto python packages. This by installing this extension you will also install these packages and get access to their functionality.
For an example see Impress append Slides to existing slide show on Live LibreOffice Python UNO Examples
See Also:
Install Notes
Because this extension installs python packages that require some compiling, it may, depending on what packages are not yet installed, take a few minutes to install on first startup. After initial install there is no delay to LibreOffice startup.
The extension will install the packages in the user's python environment. If the user does not have a python environment, one will be created. If the LibreOffice python environment does not exist, one will be created.
A log file can be found in the LibreOffice user directory. The log file is named ooodevguiwin_install.log. The log file will contain information about the installation and any errors that may have occurred.
The LibreOffice user folder is usually located at C:\Users\<user>\AppData\Roaming\Python\Python38\site-packages where <user> is the user name. Also there is an environment variable ORG_OPENOFFICE_EXTENSIONS_OOODEVGUIWIN_LOG_FILE that can be used to find the path of the log file.
Example Macro
This example is a macro that will toggle the status bar in Writer by sending a key combination to the GUI.
# coding: utf-8
from __future__ import unicode_literals, annotations
from odevgui_win.robot_keys import RobotKeys
from odevgui_win.class_args.send_key_info import SendKeyInfo
from odevgui_win.keys.writer_key_codes import WriterKeyCodes
from ooodev.macro.macro_loader import MacroLoader
def toggle_status(*args, **kwargs):
with MacroLoader():
RobotKeys.send_current(SendKeyInfo(WriterKeyCodes.TOGGLE_STATUS_BAR))
g_exportedScripts = (toggle_status,)
See Also:
Homepage: https://github.com/Amourspirit/ooodev-gui-win-ext
Repository: https://github.com/Amourspirit/ooodev-gui-win-ext
Release | Description | Compatibility | Operating Systems | License | Release notes | Updated | |
---|---|---|---|---|---|---|---|
0.3.2.3 | Updated installer and options | 7.0 | Windows | MIT | Updated Installer, updated options to control logging, More language support. | 2023-10-16 14:23:05 | Download |
0.3.2.2 | Initial Release | 7.0 | Windows | MIT | Initial Release | 2023-10-07 17:44:54 | Download |
☆ ☆ ☆ ☆ ☆
Post your review
You cannot post reviews until you have logged in. Login Here.
Reviews
No one has commented on this page yet.
RSS feed for reviews on this page | RSS feed for all reviews