Python Macro oxt

Discussions about using 3rd party extension with OpenOffice.org

Python Macro oxt

Postby matmir » Wed Sep 18, 2019 9:13 am

Hello,
I've created an extension oxt for LibreOffice, in python.
If I execute this macro in writer, it is all ok, but if I execute after installation of my oxt, this is the error:

Errore dello schema di scripting durante l'esecuzione dello script Python vnd.sun.star.script:NewMacro-L-1.3.oxt|python|ProvaUno.py$info?language=Python&location=user:uno_packages.

Messaggio: <class 'KeyError'>: 'NewMacro-L-1.3.oxt'
File "C:\Program Files\LibreOffice\program\pythonscript.py", line 1037, in getScript
self.provCtx.uriHelper.getStorageURI(scriptUri) );
File "C:\Program Files\LibreOffice\program\pythonscript.py", line 407, in getStorageUrlFromPersistentUrl
package = self.mapPackageName2Path[ packageName ]


Can someone help me please?
thanks...
LibreOffice Versione: 6.2.1.2 (x64) on Windows 7
matmir
 
Posts: 4
Joined: Mon Sep 09, 2019 3:15 pm

Re: Python Macro oxt

Postby Zizi64 » Wed Sep 18, 2019 9:17 am

We can not help without the macro code and the extension...
Tibor Kovacs, Hungary; LO6.1.6, 6.2.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.4.0; AOO4.1.6
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 8768
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Python Macro oxt

Postby matmir » Wed Sep 18, 2019 9:38 am

I've attached the file oxt.
and the file python.
Attachments
NewMacro-L-1.3.oxt
(50.28 KiB) Downloaded 20 times
LibreOffice Versione: 6.2.1.2 (x64) on Windows 7
matmir
 
Posts: 4
Joined: Mon Sep 09, 2019 3:15 pm

Re: Python Macro oxt

Postby matmir » Wed Sep 18, 2019 9:41 am

this is the content of python file:

 Edit: Text extracted and inserted into attached file python.txt, to shorten posting. It may need editiog to conform to normal python formatting standards. [RoryOF, Moderator] 
Attachments
python.txt
(9.77 KiB) Downloaded 25 times
LibreOffice Versione: 6.2.1.2 (x64) on Windows 7
matmir
 
Posts: 4
Joined: Mon Sep 09, 2019 3:15 pm

Re: Python Macro oxt

Postby Villeroy » Wed Sep 18, 2019 12:01 pm

A self-explaining installer template and an installer document with your code.
Attachments
topic_99373.py.odt
Topic's Python code in the installer template
(26.85 KiB) Downloaded 25 times
Dump2Profile.ott
Template to dump text files (i.e. macros) to the user profile. Contains some StarBasic code.
(17.02 KiB) Downloaded 35 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 27727
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany


Return to Extensions

Who is online

Users browsing this forum: No registered users and 1 guest