Re: Can Java Scripts no longer been called from basic macro ?
Oliver, sorry but still the same error An exception occurred Type: com.sun.star.script.provider.ScriptFrameworkErrorException Message: unsatisfied query for interface of type com.sun.star.script.provider.XScriptProvider!. - Windows 8 - het scripts are on the machine "C:\Program Files (x86)\LibreOffice 4\share\Scripts\javascript\HelloWorld\helloworld.js" but in de UI i can also not sea the Java libraries maybe i must enabling something in the options to handle java ? Greetz On 14/04/2016 19:03, Oliver Brinzing wrote: Hi, this will work in LO 4 and LO 5: OPTION EXPLICIT Sub oJavaScriptMacro Dim oMSPF as Object Dim oSP as Object Dim oScript as Object oMSPF = GetDefaultContext.getValueByName("/singletons/com.sun.star.script.provider.theMasterScriptProviderFactory") oSP = oMSPF.createScriptProvider("") ' JavaScript Macro oScript = oSP.getScript("vnd.sun.star.script:HelloWorld.helloworld.js?language=JavaScript=share") oScript.invoke(Array(), Array(), Array()) End Sub Regards Oliver ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Can Java Scripts no longer been called from basic macro ?
Hi, i think, the Scripting Framework needs a 32bit Java JRE installed. For example, if i remove "C:\Program Files (x86)\LibreOffice 5.1\program\classes\ScriptFramework.jar" the macro will fail too. Oliver Am 14.04.2016 um 19:28 schrieb SOS: Oliver, sorry but still the same error An exception occurred Type: com.sun.star.script.provider.ScriptFrameworkErrorException Message: unsatisfied query for interface of type com.sun.star.script.provider.XScriptProvider!. - Windows 8 - het scripts are on the machine "C:\Program Files (x86)\LibreOffice 4\share\Scripts\javascript\HelloWorld\helloworld.js" but in de UI i can also not sea the Java libraries maybe i must enabling something in the options to handle java ? Greetz On 14/04/2016 19:03, Oliver Brinzing wrote: Hi, this will work in LO 4 and LO 5: OPTION EXPLICIT Sub oJavaScriptMacro Dim oMSPF as Object Dim oSP as Object Dim oScript as Object oMSPF = GetDefaultContext.getValueByName("/singletons/com.sun.star.script.provider.theMasterScriptProviderFactory") oSP = oMSPF.createScriptProvider("") ' JavaScript Macro oScript = oSP.getScript("vnd.sun.star.script:HelloWorld.helloworld.js?language=JavaScript=share") oScript.invoke(Array(), Array(), Array()) End Sub Regards Oliver ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Can Java Scripts no longer been called from basic macro ?
Hi, this will work in LO 4 and LO 5: OPTION EXPLICIT Sub oJavaScriptMacro Dim oMSPF as Object Dim oSP as Object Dim oScript as Object oMSPF = GetDefaultContext.getValueByName("/singletons/com.sun.star.script.provider.theMasterScriptProviderFactory") oSP = oMSPF.createScriptProvider("") ' JavaScript Macro oScript = oSP.getScript("vnd.sun.star.script:HelloWorld.helloworld.js?language=JavaScript=share") oScript.invoke(Array(), Array(), Array()) End Sub Regards Oliver ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Can Java Scripts no longer been called from basic macro ?
Hallo, I need confirmation if a java script or macro can no longer (sinds (LO 4) been called from a basic macro who was running fine on LO 3 using 4.4 I get a error calling the script: oScript = oSP.getScript("vnd.sun.star.script:Library1\Macro1.js?language=JavaScript=user") the script is located under windows: I made manually the directorys under Users\[UserName]\AppData\Roaming\LibreOffice\3\user\ "Scripts" directory "JavaScript" directory "Library1" directory with the Macro1.js file inside C:\Users\[UserName]\AppData\Roaming\LibreOffice\3\user\Scripts\JavaScript\Library1\Macro1.js the compleet examle from the "openoffice3.web.fc2.com" website: Sub oJavaScriptMacro Dim oMSPF as Object Dim oSP as Object Dim oScript as Object oMSPF = GetDefaultContext.getValueByName( "/singletons/com.sun.star.script.provider.theMasterScriptProviderFactory") oSP = oMSPF.createScriptProvider("") ' JavaScript Macro oScript = oSP.getScript"vnd.sun.star.script:Library1\Macro1.js?language=JavaScript=user") ' Macroå®è¡ oScript.invoke( array(),array(),array()) End Sub Thanks for any help Fernand ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice