User Guide for the Early Developer Release (Version 0.1)
This is a simple user guide for the Early Developer Release of the Office Scripting FrameworkContents
TopPre-requisites
Before you install the Scripting Framework, be aware of the following:- This is an Early Developer Release of the Office Scripting Framework provided for users and developers of OpenOffice.org to try out and provide feedback. Future releases of the Framework may change.
- This release of the Scripting Framework runs only on OpenOffice.org 643C.
- The Scripting Framework is currently available in English only.
Running the example Office Scripts
There are two examples scripts supplied with the Scripting Framework, namely Highlight, and MemoryUsage. Highlight is an application level script for Writer that allows the user to search for a word or phrase. It will highlight all instances in red and give a count of the number of instances.The second example, MemoryUsage, is a script stored in a Calc spreadsheet that checks the current memory usage in the Java Virtual Machine and updates cells in the spreadsheet with the usage values. The spreadsheet also contains a graph which will update when the cell values are changed.
The examples are placed in <Office Installation>/user/Scripts/java by the installer.
Running the Highlight example
To run this example you first need to create a menu item from which you can execute the script.
- Start OpenOffice.org and open an existing Writer document or create a new one.
- Select the menu item Tools/Assign Scripts (Java) To/Menu...
- In the "Assign Scripts (Java) To Menu" dialog that pops up
do the following:
- Select script function
- Select the script function HighlightText.showForm from the list.
- Choose the menu to insert the script menu after
- Select the top level menu and submenu under which you want to place your new menu item.
- Assign script to new menu
- In the New Menu text field enter the label you want for your menu item (eg. Highlight)
- Click New Script Menu to create the new script menu item.
- Select script function
- Finally click on the OK button to save your new script menu item.
- Restart OpenOffice.org and open a Writer document
- Note: Menu items are not updated on the fly, hence the need to restart, this will be addressed in a future release.
- Your new menu item will now be available and clicking on it will invoke the Java script.
- You should see a Highlight Text dialog appear which you can use to highlight various text strings you are looking for in the document.
Running the MemoryUsage example
The MemoryUsage example is already deployed inside an Office document,
<Office Installation>/user/Scripts/java/ExampleSpreadSheet.sxc.
You can then execute the MemoryUsage script by pressing CTRL+Shift+M
with the Troubleshooting
See the Known Issues page.
Last Modified: Fri Nov 29 14:19:53 GMT 2002