| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| <html> |
| <head> |
| <title>General User Guide</title> |
| |
| <meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8"> |
| </head> |
| |
| <body> |
| <a name="top"></a> |
| |
| <h1>User Guide for the Early Developer Release (Version 0.1)</h1> |
| |
| This is a simple user guide for the Early Developer Release of the |
| Office Scripting Framework |
| |
| <h2>Contents</h2> |
| |
| <ul> |
| <li><p><a href="#prerequisites">Pre-requisites</a> |
| <li><p><a href="#usingsf">Running the example Office Scripts</a> |
| <li><p><a href="#troubleshooting">Troubleshooting</a> |
| </ul> |
| |
| <a href="#top">Top</a> |
| <a name="prerequisites"></a> |
| |
| <h2>Pre-requisites</h2> |
| |
| Before you install the Scripting Framework, be aware of the following: |
| |
| <ul> |
| <li>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. |
| <li>This release of the Scripting Framework runs only on OpenOffice.org 643C. |
| <li>The Scripting Framework is currently available in English only. |
| </ul> |
| |
| <a href="#top">Top</a> |
| <a name="usingsf"></a> |
| |
| <h2>Running the example Office Scripts</h2> |
| |
| 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. |
| |
| <p> |
| 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. |
| |
| <p> |
| The examples are placed in <Office Installation>/user/Scripts/java |
| by the installer. |
| |
| <p> |
| <b>Running the Highlight example</b> |
| |
| <p> |
| To run this example you first need to create a menu item from which you |
| can execute the script. |
| |
| <ul> |
| <li>Start OpenOffice.org and open an existing Writer document or create |
| a new one. |
| |
| <li>Select the menu item Tools/Assign Scripts (Java) To/Menu... |
| |
| <li>In the "Assign Scripts (Java) To Menu" dialog that pops up |
| do the following: |
| |
| <ul> |
| <li><i>Select script function</i> |
| <ul><li>Select the script function HighlightText.showForm from the list. |
| </ul> |
| |
| <li><i>Choose the menu to insert the script menu after</i> |
| <ul><li>Select the top level menu and submenu under which you want |
| to place your new menu item. |
| </ul> |
| |
| <li><i>Assign script to new menu</i> |
| <ul><li>In the New Menu text field enter the label you want for your |
| menu item (eg. Highlight) |
| <li>Click New Script Menu to create the new script menu item. |
| </ul> |
| </ul> |
| |
| <li>Finally click on the OK button to save your new script menu item. |
| |
| <li>Restart OpenOffice.org and open a Writer document |
| <ul><li><b>Note:</b> Menu items are not updated on the fly, hence the |
| need to restart, this will be addressed in a future release. |
| </ul> |
| |
| <li>Your new menu item will now be available and clicking on it will |
| invoke the Java script. |
| |
| <li>You should see a Highlight Text dialog appear which you can use |
| to highlight various text strings you are looking for in the document. |
| </ul> |
| |
| <p> |
| <b>Running the MemoryUsage example</b> |
| |
| <p> |
| The MemoryUsage example is already deployed inside an Office document, |
| <nop>ExampleSpreadSheet.sxc. To run the example, just open: |
| |
| <p> |
| <Office Installation>/user/Scripts/java/ExampleSpreadSheet.sxc. |
| |
| <p> |
| You can then execute the MemoryUsage script by pressing <b>CTRL+Shift+M</b> |
| with the <nop>ExampleSpreadSheet.sxc window focused. You should |
| see the memory usage values being updated, and the graph should change to |
| reflect the new values. |
| <p> |
| |
| <a href="#top">Top</a> |
| <h2>Troubleshooting</h2> |
| |
| See the <a href="issues-list.html">Known Issues</a> page. |
| |
| <hr> |
| Last Modified: Fri Nov 29 14:19:53 GMT 2002 |
| |
| </body> |
| </html> |