| View previous topic :: View next topic |
| Author |
Message |
ossman Newbie

Joined: 21 Sep 2006 Posts: 2
|
Posted: Thu Sep 21, 2006 7:37 am Post subject: Cannot run python macro from command line |
|
|
I've constructed a small script that I've placed in the Scripts/python folder in my home dir. The macro works fine when executed from inside OOo, but as I intend to use this in a larger script system it must also work from the command line. Unfortunately it doesn't
Basic macros work fine, it's just Python stuff that refuses to do anything. I've tried the version on FC5, the one on Ubuntu and a build directly from OOo, all with the same result.
I did a strace of the process when calling it and it never even comes close to the Scripts folder. So I suspect that Python scripts aren't supported from the command line. Is this the case?
The script is called ~/.openoffice.org2/user/Scripts/python/Standard/pdf.py and the method I try to call is Test(). The following command line is used:
ooffice macro:///Standard.pdf.Test()
Help!  |
|
| Back to top |
|
 |
Danad OOo Advocate

Joined: 22 Feb 2004 Posts: 293 Location: Brasil
|
Posted: Thu Sep 21, 2006 4:35 pm Post subject: |
|
|
Maybe:
| Code: |
soffice.exe “vnd.sun.star.script:Standard.pdf.py?language=Python&location=user”
|
HTH |
|
| Back to top |
|
 |
ossman Newbie

Joined: 21 Sep 2006 Posts: 2
|
Posted: Fri Sep 22, 2006 12:48 am Post subject: |
|
|
That was enough to help me find the solution at least
The following works:
| Code: | | soffice.exe "vnd.sun.star.script:Standard/pdf.py\$Test?language=Python&location=user" |
I figured out this by digging through the pyuno source. Is this properly documented some place? I still haven't figured out how to pass parameters. |
|
| Back to top |
|
 |
|