Page 1 of 1

New to macros, need some input

Posted: Mon Feb 19, 2018 1:50 am
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.

Re: New to macros, need some input

Posted: Mon Feb 19, 2018 2:10 am
by Villeroy
First learn a simple computer language. Then dive into complex APIs. This API makes a grown man cry.

Re: New to macros, need some input

Posted: Mon Feb 19, 2018 2:24 am
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

Re: New to macros, need some input

Posted: Mon Feb 19, 2018 2:44 am
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.

Re: New to macros, need some input

Posted: Mon Feb 19, 2018 11:03 am
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.