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

Joined: 31 Aug 2010 Posts: 3 Location: Germany
|
Posted: Tue Aug 31, 2010 7:29 am Post subject: start script with makro |
|
|
Hi,
I'm probably showing my vast ignorance of OOo uno and also showing laziness with this question, but here it is:
I try to write an easy html-reporting tool for a postgresql database, with my own css style sheet, first i tried it in calc. I made a little script in basic which sets me in every calc cell the data with a <tr> and/or <td> string. Then exported the calc file as txt and named it html... Well, this works really pretty. A little bit slow but, it has done the job. So far so good.
Now i try to make it a little bit more complex, like creating an index side of all sheets and database requests... I want to do it with a python script... well, in fact i already have this python script...
You are waiting for the question... Here it is:
When I'm editing my PostgreSQL database with Base, I want to start a macro after editing (for example during click on save). This macro has to start the python script, but the python script is an extra one (nothing to do with OOo).
---------------------------------------------------
edit: I'm sorry, maybe i haven't precised my problem good enough... I try to launch a program with OO macro...
Last edited by python on Wed Sep 01, 2010 11:26 pm; edited 1 time in total |
|
| Back to top |
|
 |
python Newbie

Joined: 31 Aug 2010 Posts: 3 Location: Germany
|
Posted: Wed Sep 01, 2010 1:05 pm Post subject: |
|
|
Hmmm hi again,
is this problem unsolvable?
Is there no way to execute an os command with an OO.o macro???
Let's say I want to start Firefox or another program after saving a calc file??
Thanks so far
Last edited by python on Wed Sep 01, 2010 11:27 pm; edited 2 times in total |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
|
| Back to top |
|
 |
python Newbie

Joined: 31 Aug 2010 Posts: 3 Location: Germany
|
Posted: Wed Sep 01, 2010 11:25 pm Post subject: |
|
|
Thank you Villeroy,
I know how to start a python script. But I want to start the python script with an OpenOffice macro...
For example:
- Open Base (with click on the base icon, no script nothing....)
- Edit a Database
- Click on Save
- Macro starts and launches another program (python script, web browser, what ever..) |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Thu Sep 02, 2010 1:18 pm Post subject: |
|
|
Simply start coding some OOo macro in Python and you'll see that your question is pointless.
For other languages there is the com.sun.star.ScriptProvider _________________ Rest in peace, oooforum.org
Get help on http://forum.openoffice.org |
|
| Back to top |
|
 |
|