Difference between revisions of "Documentation/DevGuide/Scripting/Scripting Framework"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Updated link to OOo Basic)
m
 
(6 intermediate revisions by 5 users not shown)
Line 4: Line 4:
 
|NextPage=Documentation/DevGuide/Scripting/Using the Scripting Framework
 
|NextPage=Documentation/DevGuide/Scripting/Using the Scripting Framework
 
}}
 
}}
[[zh:Zh/Documentation/DevGuide/Scripting/Scripting Framework]]
+
{{Documentation/DevGuideLanguages|Documentation/DevGuide/Scripting/{{SUBPAGENAME}}}}
 
{{DISPLAYTITLE:Scripting Framework}}
 
{{DISPLAYTITLE:Scripting Framework}}
A {{PRODUCTNAME}} macro is a short program used to automate a number of steps. The Scripting Framework is a new feature in {{PRODUCTNAME}} [VERSION]. It allows users to write and run macros for {{PRODUCTNAME}} in a number of programming and scripting languages including:
+
{{Download Collection|MediaWiki:Collections/Developer's Guide - Scripting Framework}}
 +
An {{AOo}} macro is a short program used to automate a number of steps. The Scripting Framework is a new feature in {{AOo}}. It allows users to write and run macros for {{AOo}} in a number of programming and scripting languages including:
  
* BeanShell (http://www.beanshell.org/)
+
* BeanShell (https://www.beanshell.org/)
* JavaScript (http://www.mozilla.org/rhino/)
+
* JavaScript (https://www.mozilla.org/rhino/)
* Java ([http://www.java.com/ http://www.java.com])
+
* Java ([https://www.java.com/ https://www.java.com])
* {{PRODUCTNAME}} Basic [[Documentation/DevGuide/Basic/OpenOffice.org Basic|OpenOffice.org Basic]]
+
* Python ([[Python_as_a_macro_language|Python as a macro language]])
 +
* {{AOo}} Basic ([[Documentation/DevGuide/Basic/OpenOffice.org Basic|Apache OpenOffice Basic]])
 
The framework is designed so that developers can add support for new languages.
 
The framework is designed so that developers can add support for new languages.
  
{{Documentation/Note|In this chapter, the terms ''macro'' and ''script'' are interchangeable.}}
+
{{Note|In this chapter, the terms ''macro'' and ''script'' are interchangeable.}}
  
 
=== Structure of this Chapter ===
 
=== Structure of this Chapter ===
Line 25: Line 27:
 
* Section [[Documentation/DevGuide/Scripting/Writing Macros|Writing Macros]] provides a guide on how to get started with writing Scripting Framework macros
 
* Section [[Documentation/DevGuide/Scripting/Writing Macros|Writing Macros]] provides a guide on how to get started with writing Scripting Framework macros
 
** Describes how to write a simple HelloWorld macro.
 
** Describes how to write a simple HelloWorld macro.
** Describes how Scripting Framework macros interact with {{PRODUCTNAME}} and the {{PRODUCTNAME}} API.
+
** Describes how Scripting Framework macros interact with {{AOo}} and the {{AOo}} API.
 
** Describes how to create a dialog from a Scripting Framework macro.
 
** Describes how to create a dialog from a Scripting Framework macro.
 
** Describes how to compile and deploy a Java macro.
 
** Describes how to compile and deploy a Java macro.
Line 37: Line 39:
 
=== Who Should Read this Chapter ===
 
=== Who Should Read this Chapter ===
  
If you are interested in automating {{PRODUCTNAME}} using BeanShell, JavaScript, Java or {{PRODUCTNAME}} Basic then you should read sections [[Documentation/DevGuide/Scripting/Using the Scripting Framework|Using the Scripting Framework]] and [[Documentation/DevGuide/Scripting/Writing Macros|Writing Macros]].
+
If you are interested in automating {{AOo}} using BeanShell, JavaScript, Java, Python or {{AOo}} Basic then you should read sections [[Documentation/DevGuide/Scripting/Using the Scripting Framework|Using the Scripting Framework]] and [[Documentation/DevGuide/Scripting/Writing Macros|Writing Macros]].
  
 
If you are interested in adding support to run and write macros in a language with a Java based interpreter then you should read section [[Documentation/DevGuide/Scripting/Writing a LanguageScriptProvider UNO Component using the Java Helper Classes|Writing a LanguageScriptProvider UNO Component using the Java Helper Classes]].
 
If you are interested in adding support to run and write macros in a language with a Java based interpreter then you should read section [[Documentation/DevGuide/Scripting/Writing a LanguageScriptProvider UNO Component using the Java Helper Classes|Writing a LanguageScriptProvider UNO Component using the Java Helper Classes]].

Latest revision as of 18:07, 21 December 2020



PDF Icon.gif Download as a PDF or ODT


An Apache OpenOffice macro is a short program used to automate a number of steps. The Scripting Framework is a new feature in Apache OpenOffice. It allows users to write and run macros for Apache OpenOffice in a number of programming and scripting languages including:

The framework is designed so that developers can add support for new languages.

Documentation note.png In this chapter, the terms macro and script are interchangeable.

Structure of this Chapter

This chapter is organized into the following sections:

  • Section Using the Scripting Framework describes the user interface features of the Scripting Framework
    • Describes how to run a macro using the Run Macro dialog.
    • Describes how to use the Organizer dialogs to create, edit and manage macros.
  • Section Writing Macros provides a guide on how to get started with writing Scripting Framework macros
    • Describes how to write a simple HelloWorld macro.
    • Describes how Scripting Framework macros interact with Apache OpenOffice and the Apache OpenOffice API.
    • Describes how to create a dialog from a Scripting Framework macro.
    • Describes how to compile and deploy a Java macro.
  • Section How the Scripting Framework Works describes how the plug-able architecture of the Scripting Framework allows support for new scripting languages to be added easily.
  • Section Writing a LanguageScriptProvider UNO Component using the Java Helper Classes describes how to use the Scripting Framework Java helper classes to add support for a new scripting language
    • Describes how to use the ScriptProvider abstract base class.
    • Describes how to add editor and management support.
    • Describes how to build and register a ScriptProvider.
  • Section Writing a LanguageScriptProvider UNO Component From Scratch describes how to write a LanguageScriptProvider UNO component.

Who Should Read this Chapter

If you are interested in automating Apache OpenOffice using BeanShell, JavaScript, Java, Python or Apache OpenOffice Basic then you should read sections Using the Scripting Framework and Writing Macros.

If you are interested in adding support to run and write macros in a language with a Java based interpreter then you should read section Writing a LanguageScriptProvider UNO Component using the Java Helper Classes.

If you are interested in adding support for a scripting language from scratch then you should read section Writing a LanguageScriptProvider UNO Component From Scratch.

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages