LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 12-07-2005, 11:10 AM   #1
richardh1970
LQ Newbie
 
Registered: Nov 2005
Location: Buckinghamshire, UK
Distribution: Tried Slack, tried Ubuntu (hated it), tried Arch, back to Slack, now just finished tweaking LFS...
Posts: 21

Rep: Reputation: 0
Scripting/Automating Programs (like COM.... :$ )


I looked for answers to this already - but I couldn't find them. Apologies is this has been asked before...

OK - I'm a Windows programmer at the moment, so I'm used to writing VBA code (Macros) to automate programs like Word, Excel etc 'from the inside' and writing scripts (typically js) to automate them 'from the outside'. So my life is full of things like...

var oExcel;
oExcel = new ActiveXObject("excel.application");
oExcel.Workbooks.Add(...);etc.

How do I use my nice shiny new Linux system to automate OpenOffice, Koffice etc. in a similar way? I've read about StarBasic, so I think I can manage to write macros in that, but those are stored in the document and processed by the application itself. Often it is preferable (or occasionally necessary) to automate from 'outside' the application, such as from script.

I'm happy with any sensible scripting language you suggest - although I must admit at the moment I'm hugely impressed with Python. If need be I can dig out my rusty C++ skills - but surely these things can be scripted?

Cheers,

Richard.
 
Old 12-08-2005, 05:45 AM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: ubuntu
Posts: 2,530

Rep: Reputation: 108Reputation: 108
Quote:
How do I use my nice shiny new Linux system to automate OpenOffice, Koffice etc. in a similar way? I've read about StarBasic, so I think I can manage to write macros in that, but those are stored in the document and processed by the application itself.
I only know (a little) about OpenOffice.org (OOo) programming. The native language to program using OOo-object is Java (OOo has a Sun history). But the API is also available to C++ and purhaps other langauages. AFAIK you can only use these languages from outside documents. If you want to program macro's that reside inside doc's, you can only use OO-basic.

Quote:
I'm happy with any sensible scripting language you suggest - although I must admit at the moment I'm hugely impressed with Python.
Ah, python! Then the good news is that starting with the rather new OOo version 2.0 has an imbedded python interpreter, so you now can write macros in python instead of OO-basic for use inside doc's. I guess it's also very well possible to use python from outside doc's, but I didn't have a look at it yet.

Some links about OOo-API programming:
http://www.ooomacros.org/dev.php
http://www.pitonyak.org/oo.php
http://wiki.services.openoffice.org/wiki/VBA

Official doc's: http://api.openoffice.org/Developers...persGuide.html

A forum dedicated to OOo-programming:
http://www.oooforum.org/forum/viewforum.phtml?f=9
 
Old 12-08-2005, 07:14 AM   #3
richardh1970
LQ Newbie
 
Registered: Nov 2005
Location: Buckinghamshire, UK
Distribution: Tried Slack, tried Ubuntu (hated it), tried Arch, back to Slack, now just finished tweaking LFS...
Posts: 21

Original Poster
Rep: Reputation: 0
Thanks for the advice, I'll see what I can find.

R.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Scripting question - inputting into programs yayphysics Linux - Newbie 6 03-28-2005 07:56 AM
Scripting help. How to launch 2+ programs simultaneously. ColKurtz Linux - Newbie 2 02-18-2005 06:14 PM
Automating simple commands, scripting or programming? entob *BSD 3 09-01-2004 01:56 AM
automating using shell scripting LinToWinWin Linux - Newbie 1 07-23-2004 09:57 PM
automating console to x c0c0deuz Linux - General 2 11-01-2002 12:02 AM


All times are GMT -5. The time now is 09:47 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration