How to put multiple macros inside one setup oxt file
How to put multiple macros inside one setup oxt file
Hello!
Please help.
How can I put several macros written in one of the languages allowed in LibreOffice (let's say Basic) in one oxt file?
That is, when you run (double-click) the oxt-file, all these macros will be installed.
For now, there is an oxt file that, when installed, adds a spell check in some language.
And you need to add a macro there, which will perform a simple replacement (like this: find “g”, replace with “u”).
Please help.
How can I put several macros written in one of the languages allowed in LibreOffice (let's say Basic) in one oxt file?
That is, when you run (double-click) the oxt-file, all these macros will be installed.
For now, there is an oxt file that, when installed, adds a spell check in some language.
And you need to add a macro there, which will perform a simple replacement (like this: find “g”, replace with “u”).
OpenOffice 3.1 on Windows 10
- Hagar Delest
- Moderator
- Posts: 32678
- Joined: Sun Oct 07, 2007 9:07 pm
- Location: France
Re: How to put multiple macros inside one setup oxt file
Hi and welcome to the forum!
That is what I do also, to quickly reinstall all my custom macros at once.
See: [Solved] How to back up macro library files.
When you modify a macro, then just export again the relevant module, and open the .oxt with an archive manager (it is actually a mere zip archive), then replace the old file(s) by the new one(s).
Please add [Solved] at the beginning of the title in your first post (top of the topic) with the 🖉 button if your issue has been fixed.
That is what I do also, to quickly reinstall all my custom macros at once.
See: [Solved] How to back up macro library files.
When you modify a macro, then just export again the relevant module, and open the .oxt with an archive manager (it is actually a mere zip archive), then replace the old file(s) by the new one(s).
Please add [Solved] at the beginning of the title in your first post (top of the topic) with the 🖉 button if your issue has been fixed.
LibreOffice 24.2 on Xubuntu 24.04 and 7.6.4.1 portable on Windows 10
Re: How to put multiple macros inside one setup oxt file
Hi!Hagar Delest wrote: ↑Wed May 24, 2023 2:45 pm Hi and welcome to the forum!
That is what I do also, to quickly reinstall all my custom macros at once.
See: [Solved] How to back up macro library files.
When you modify a macro, then just export again the relevant module, and open the .oxt with an archive manager (it is actually a mere zip archive), then replace the old file(s) by the new one(s).
Please add [Solved] at the beginning of the title in your first post (top of the topic) with the 🖉 button if your issue has been fixed.
Maybe I did not write my question quite accurately (for your forum I write in another language and Google translates it for me).
I know that oxt is zip.
I have an oxt file that sets up spell checking for one specific language.
And I also have a small macro in OpenOffice Basic.
I need to embed this little macro into my finished oxt file.
So that when installing the oxt file (double-click), the following happens:
1) install spell checker
2) that macro will be installed.
OpenOffice 3.1 on Windows 10
- Hagar Delest
- Moderator
- Posts: 32678
- Joined: Sun Oct 07, 2007 9:07 pm
- Location: France
Re: How to put multiple macros inside one setup oxt file
I don't know how dictionaries are packaged in extensions. Thus, don't know if you can package a macro library and the spell check feature in the same extension. But if the addons.xcu file is well formed, then it may be possible.
Try to compare the files between a simple extension with a macro and yours with the spell checking part.
Try to compare the files between a simple extension with a macro and yours with the spell checking part.
LibreOffice 24.2 on Xubuntu 24.04 and 7.6.4.1 portable on Windows 10
Re: How to put multiple macros inside one setup oxt file
I don't know how dictionaries are packaged in extensions either but normally you put the macros in a library and the library becomes part of the extension.
Take a look at Extension Compiler
https://wiki.openoffice.org/wiki/Extens ... n_Compiler
Take a look at Extension Compiler
https://wiki.openoffice.org/wiki/Extens ... n_Compiler
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Re: How to put multiple macros inside one setup oxt file
Aren't all spell checking services for OpenOffice/LibreOffice packed into an oxt file?Hagar Delest wrote: ↑Wed May 24, 2023 3:55 pm I don't know how dictionaries are packaged in extensions.
And the spellcheck files themselves inside oxt have the Hunspell standard.
There are examples here:
https://extensions.libreoffice.org/?sta ... s%5B%5D=58
How can I do that?Hagar Delest wrote: ↑Wed May 24, 2023 3:55 pmTry to compare the files between a simple extension with a macro and yours with the spell checking part.
OpenOffice 3.1 on Windows 10
- Hagar Delest
- Moderator
- Posts: 32678
- Joined: Sun Oct 07, 2007 9:07 pm
- Location: France
Re: How to put multiple macros inside one setup oxt file
Yes but macros and dictionaries are not the same thing.
To compare extensions, since they are mere zip files, unzip one that contains a simple macro and study its content. I think that most of the settings are in the addons.xcu file. The trick will be to have one that declares both the files for the spell check and the library for the macro.
LibreOffice 24.2 on Xubuntu 24.04 and 7.6.4.1 portable on Windows 10
Re: How to put multiple macros inside one setup oxt file
And if we are talking about two macros in BASIC or Python (and not about spell checking). How, then, to combine them in one oxt file?Hagar Delest wrote: ↑Wed May 24, 2023 6:40 pmYes but macros and dictionaries are not the same thing.
OpenOffice 3.1 on Windows 10
Re: How to put multiple macros inside one setup oxt file
Tools>Macros>Organize>Basic...
Button [Organizer]
Tab [Libraries]
Choose the library and export as oxt. This will not work with the special library named "Standard". You have to save the macros in a specifically named Basic library.
Button [Organizer]
Tab [Libraries]
Choose the library and export as oxt. This will not work with the special library named "Standard". You have to save the macros in a specifically named Basic library.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: How to put multiple macros inside one setup oxt file
https://wiki.openoffice.org/wiki/Docume ... ganization
https://wiki.openoffice.org/wiki/Docume ... mple_macro
https://wiki.openoffice.org/wiki/Docume ... mple_macro
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)