Using LO 4.4.1.2 on Windows 8.
Looking at the Python and JavaScript Macros supplied with the distribution. Using Writer document with button.
Python
Using the Macro Selector RUN HellowWorld.py works ok. When this Macro is assigned to the button click get this error :-
com.sun.star.uno.RuntimeExceptionError during invoking function
HelloWorldPython in module file:///C:/Prograrn%20Files%20(x86)/Libre0ffice
%204/share/Scripts/python/HelloWorld.py (< class ‘TypeError’ >:
HelloWorldPython0 takes 0 positional arguments but 1 was given
C:\Program Files (x86)\Libre0ffice 4\program\pythonscript.py:869 in function
invokeO [ret : self.func( *args )]
)
I would have thought that these operations are the same but what is the argument error that is shown above? How can this Macro be run from the button?
JavaScript
Running hellowworld.js directly gives this error :-
’, [jni_uno bridge error] UNO calling Java method getPropertyValue:
non-UNO exception occurred: java.lang.RuntimeException:
java.lang.NoSuchFieldException: uri
java stack trace:
java.lang.RuntimeException:java.lang.NoSuchFieldException: uri
at
com.sun.star.lib.uno.helper.PropertySet.getPropertyValue(PropertySetJava:84S)
at
com.sun.star.lib.uno.helper.PropertySet.getPropertyValue(PropertySetJava:380)
Caused by: java.lang.NoSuchFieldException: uri
at java.lang.Class.getDeclaredFielod(Unknown Source)
at
com.sun.star.lib.uno.helper.PropertySet.getPropertyValue(PropertySetJava:838)
1 more
What does this all mean? How can a JavaScript Macro be run? Also if trying to assign this macro to the button it is not shown in the list of Macros.
I thought that as these Macros are supplied with the distribution they would work.