OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

start script with makro

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
python
Newbie
Newbie


Joined: 31 Aug 2010
Posts: 3
Location: Germany

PostPosted: Tue Aug 31, 2010 7:29 am    Post subject: start script with makro Reply with quote

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
View user's profile Send private message
python
Newbie
Newbie


Joined: 31 Aug 2010
Posts: 3
Location: Germany

PostPosted: Wed Sep 01, 2010 1:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Wed Sep 01, 2010 4:00 pm    Post subject: Reply with quote

Ask in a Python forum how to start a program or shell script in Python.
http://docs.python.org/library/os.html#process-management
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
python
Newbie
Newbie


Joined: 31 Aug 2010
Posts: 3
Location: Germany

PostPosted: Wed Sep 01, 2010 11:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Thu Sep 02, 2010 1:18 pm    Post subject: Reply with quote

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 https://forum.openoffice.org
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group