[Python]: Project template for macros or custom scripts

Creating Extension - 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 forum is not for asking questions about writing your own macros.

[Python]: Project template for macros or custom scripts

Postby sasa » Wed Feb 08, 2017 1:17 am

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 62 times
LibreOffice 5.2 on Xubuntu 16.04
sasa
 
Posts: 3
Joined: Wed Feb 08, 2017 12:54 am

Return to Code Snippets

Who is online

Users browsing this forum: No registered users and 1 guest