OpenOffice.org OpenOffice - 3.0 Guía de inicio rápido Pagina 368

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 433
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 367
Your first macro
A macro is a saved sequence of commands or keystrokes that are
stored for later use. An example of a simple macro is one that “types”
your address. The OpenOffice.org macro language is very flexible,
allowing automation of both simple and complex tasks. Macros are
especially useful to repeat a task the same way over and over again.
OpenOffice.org macros are usually written in a language called
StarBasic, or just abbreviated Basic. Although you can learn Basic and
write macros, there is a steep learning curve to writing macros from
scratch. The usual method for a beginner is to use the built-in macro
recorder, which records your keystrokes and saves them for use.
Most tasks in OpenOffice.org are accomplished by “dispatching a
command” (sending a command), which is intercepted and used. The
macro recorder works by recording the commands that are dispatched
(see “The dispatch framework” on page 377).
Creating a simple macro
Imagine repeatedly entering simple information. Although you can
store the information in the clipboard, if you use the clipboard for
something else, the contents are changed. Storing the contents as a
macro is a simple solution. (In some simple cases, including the
example used here, a better solution is to use AutoText.)
1) Use Tools > Macros > Record Macro to start recording a
macro.
A small window is displayed so you know that
OpenOffice.org is recording.
2) Type the desired information or perform an appropriate series of
operations. In this case, I typed my name,
Andrew Pitonyak
.
3) Click the Stop Recording button to stop recording, save the
macro, and display the OpenOffice.org Basic Macros dialog (see
Figure 314).
4) Be certain to open the library container named
My Macros
. Find
the library named
Standard
under My Macros. Be warned,
every
library container has a library named Standard. Select the
Standard library and click New Module to create a new module
to contain the macro.
368 Getting Started with OpenOffice.org 3
Vista de pagina 367
1 2 ... 363 364 365 366 367 368 369 370 371 372 373 ... 432 433

Comentarios a estos manuales

Sin comentarios