New to macros, need some input

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
User avatar
hogwaump
Posts: 68
Joined: Sun Jul 26, 2009 8:47 pm
Location: USA

New to macros, need some input

Post by hogwaump »

I'm a longtime user of Write and Calc, and I used to be a very good programmer. I would like to be able to create macros for both, but I'm having trouble finding good resources to do so.

First thing, I really should learn JavaScript anyway. Is this a good language for both Write & Calc? I don't see much other use for ball or python, and I think the basic macro language is limited to OpenOffice?

Second thing, can anybody point me toward a cohesive learning & reference resource for any of these methods, specifically for use in OpenOffice? I'm pretty old; I used to work with nice hefty books when I needed to pick up a computer language. All these bits and pieces I'm finding seem either uselessly simplistic, or assume everyone knows many things that I don't. My expertise was in assembly language, real-time & embedded, and BASIC, of course, then C as it matured, and at one time I was commercial Windows/C developer. A decade back, I used some PERL in creating databases for driving web sites. And I greatly lament the demise of dBase, especially effective as a prototyping tool.

Any input from writers of macros would be appreciated.
OO 4.1.5 on Windows 7, 64bit
:knock: Hogwaump, Frumious Borogove in Chief at Bandersnatch, Inc., in charge of Wabe Control Systems. Never once outgrabe at all . . .
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: New to macros, need some input

Post by Villeroy »

First learn a simple computer language. Then dive into complex APIs. This API makes a grown man cry.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
robleyd
Moderator
Posts: 5079
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: New to macros, need some input

Post by robleyd »

I'm not a macro user, but the OpenOffice.org Macro document and the book OpenOffice.org Macros Explained at http://www.pitonyak.org/oo.php are highly recommended here; there are other documents at that site you may find useful.

You'll also find https://wiki.openoffice.org/wiki/Docume ... ASIC_Guide a possible starting point.

For a useful tool see [Tutorial] Introduction into object inspection with MRI
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
JeJe
Volunteer
Posts: 2778
Joined: Wed Mar 09, 2016 2:40 pm

Re: New to macros, need some input

Post by JeJe »

I only use Basic and don't know the other languages... OOBasic is very similar to VB6 and there's a lot of VB6 code out there you can use in OO with very little adaptation. Microsoft Office also uses Basic, if you want to write something for both. If you already know Basic you should be able to start writing macros in it straight away.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
User avatar
RoryOF
Moderator
Posts: 34610
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: New to macros, need some input

Post by RoryOF »

The OO BASIC manuals may give you as much as you need; if you have to go beyond that then go to the Pitonyak books as pointed to by robleyd.

For most purposes the inbuilt functionality of OO is sufficient. Often newcomers baulk at reading the manuals or even the Help files, and think that a macro is the easy way out - not so! Better to get to grips with the program as it is than waste time trying to write a macro to do some simple inbuilt task, even if it takes a number of passes to achieve the final desired result.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Post Reply