New to macros, need some input

Creating a macro - Writing a Script - Using the API

New to macros, need some input

Postby hogwaump » Mon Feb 19, 2018 1:50 am

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
Posts: 68
Joined: Sun Jul 26, 2009 8:47 pm
Location: USA

Re: New to macros, need some input

Postby Villeroy » Mon Feb 19, 2018 2:10 am

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, no OpenOffice, LibreOffice 6.x
User avatar
Posts: 26974
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: New to macros, need some input

Postby robleyd » Mon Feb 19, 2018 2:24 am

I'm not a macro user, but the Macro document and the book Macros Explained at are highly recommended here; there are other documents at that site you may find useful.

You'll also find ... ASIC_Guide a possible starting point.

For a useful tool see [Tutorial] Introduction into object inspection with MRI
Apache OpenOffice Developer Build 4.2.0 9820 - Slackware 14.2 - 64 bit
LibreOffice - Slackware 14.2 - 64 bit
Apache OpenOffice 4.1.4 - Windows 7 Virtual machine
User avatar
Posts: 2871
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: New to macros, need some input

Postby JeJe » Mon Feb 19, 2018 2:44 am

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.
Openoffice 4.1.2
Windows 8
Posts: 551
Joined: Wed Mar 09, 2016 2:40 pm

Re: New to macros, need some input

Postby RoryOF » Mon Feb 19, 2018 11:03 am

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.6 on Xubuntu 18.04.2 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
Posts: 29260
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 9 guests