[Python]: Project template for macros or custom scripts

Shared Libraries
Forum rules
For sharing working examples of macros / scripts. These can be in any script language supported by OpenOffice.org [Basic, Python, Netbean] or as source code files in Java or C# even - but requires the actual source code listing. This section is not for asking questions about writing your own macros.
Post Reply
sasa
Posts: 11
Joined: Wed Feb 08, 2017 12:54 am

[Python]: Project template for macros or custom scripts

Post by sasa »

Project template which integrates frequently used methods in office context and basic GUI boxes.
Unzip end copy my_project in .../Script/python directory. Read the instructions and adapt to your needs.

Frequently used methods:
createUnoService(service)
createUnoStruct(struct)
getDesktop()
getCurrentComponent()
getDocument()
getCurrentFrame()
getCurrentComponentWindow()
getCurrentContainerWindow()
getCurrentController()
callMRI(obj)
callXray(obj)

Slightly modified from: Forum

Basic GUI boxes for interaction with a user:
make choices (SelectBox, OptionBox)
enter new data (TextBox, NumberBox, DateBox)
get paths (FolderPathBox, FilePathBox)
show information (MessageBox)
make a decision (ActionBox)

Slightly modified from: GitHub
Disclaimer: I'm the author of Unodit.

Hope this could be useful to the community.
Please send me any comment, suggestion or correction you may have.
Attachments
my_project_v_01.zip
(5.32 KiB) Downloaded 299 times
LibreOffice 6.3 on Xubuntu 18.04
Post Reply