summaryrefslogtreecommitdiff
path: root/helpcontent2/source/text/shared/guide/scripting.xhp
diff options
context:
space:
mode:
Diffstat (limited to 'helpcontent2/source/text/shared/guide/scripting.xhp')
-rwxr-xr-xhelpcontent2/source/text/shared/guide/scripting.xhp250
1 files changed, 250 insertions, 0 deletions
diff --git a/helpcontent2/source/text/shared/guide/scripting.xhp b/helpcontent2/source/text/shared/guide/scripting.xhp
new file mode 100755
index 0000000000..efa84f3ced
--- /dev/null
+++ b/helpcontent2/source/text/shared/guide/scripting.xhp
@@ -0,0 +1,250 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--***********************************************************************
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRUNTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRUNTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc..
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************-->
+
+<helpdocument version="1.0">
+<meta>
+<topic id="textsharedguidescriptingxml" indexer="include" status="FINAL">
+<title id="tit" xml-lang="en-US">Scripting %PRODUCTNAME</title>
+<filename>text/shared/guide/scripting.xhp</filename>
+</topic>
+<history>
+<created date="2004-05-18T16:01:47">UFI: new scripting framework feature</created>
+<lastedited date="2004-08-12T15:57:47"/>
+</history>
+</meta>
+<body>
+<bookmark xml-lang="en-US" branch="index" id="bm_id5277565"><bookmark_value>assigning scripts</bookmark_value>
+<bookmark_value>macros;scripting</bookmark_value>
+<bookmark_value>Basic;scripting</bookmark_value>
+<bookmark_value>BeanShell scripting</bookmark_value>
+<bookmark_value>JavaScript</bookmark_value>
+<bookmark_value>JavaBeans</bookmark_value>
+<bookmark_value>Java;scripting</bookmark_value>
+<bookmark_value>programming;scripting</bookmark_value>
+<bookmark_value>scripting in programming</bookmark_value>
+</bookmark>
+<paragraph role="heading" id="par_idN1070A" xml-lang="en-US" level="1" l10n="NEW"><variable id="scripting"><link href="text/shared/guide/scripting.xhp">Scripting %PRODUCTNAME</link>
+</variable></paragraph>
+<paragraph role="paragraph" id="par_idN10728" xml-lang="en-US" l10n="NEW">You can assign custom scripts (macros) to menu items, icons, dialog controls, and events in %PRODUCTNAME.</paragraph>
+<paragraph role="paragraph" id="par_idN1072B" xml-lang="en-US" l10n="NEW">%PRODUCTNAME supports the following scripting languages:</paragraph>
+<list type="unordered">
+<listitem>
+<paragraph role="paragraph" id="par_idN10731" xml-lang="en-US" l10n="NEW">%PRODUCTNAME Basic</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10735" xml-lang="en-US" l10n="NEW">Java</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10739" xml-lang="en-US" l10n="NEW">JavaScript</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN1073D" xml-lang="en-US" l10n="NEW">BeanShell</paragraph>
+</listitem>
+</list>
+<paragraph role="heading" id="par_idN10751" xml-lang="en-US" level="2" l10n="NEW">To assign a script to a new menu entry</paragraph>
+<list type="ordered">
+<listitem>
+<paragraph role="paragraph" id="par_idN10758" xml-lang="en-US" l10n="NEW">Choose <emph>Tools - Customize</emph>, and click the <emph>Menu</emph> tab.<comment>UFI: may be a step is missing here and in the other steps. Test as soon as 680 can display the dialog - currently GPF</comment></paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10760" xml-lang="en-US" l10n="NEW">In the <emph>Category</emph> list box, scroll down and open the %PRODUCTNAME Scripts entry.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10768" xml-lang="en-US" l10n="NEW">Entries for share (scripts in the share directory of your %PRODUCTNAME installation), user (scripts in the user directory), and the current document are shown. Open any one of them to see the supported scripting languages.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN1076C" xml-lang="en-US" l10n="NEW">Open any scripting language entry to see the available scripts. Select a script.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10770" xml-lang="en-US" l10n="NEW">A list of the script functions appears in the <emph>Functions</emph> list box. Select a function.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10778" xml-lang="en-US" l10n="NEW">Click <emph>New</emph> to create a new menu assignment. The new menu entry appears in the <emph>Menu entries</emph> list box. Click the menu entry and enter text to rename the entry.</paragraph>
+</listitem>
+</list>
+<paragraph role="heading" id="par_idN10783" xml-lang="en-US" level="2" l10n="NEW">To assign a script to a key combination</paragraph>
+<list type="ordered">
+<listitem>
+<paragraph role="paragraph" id="par_idN10787" xml-lang="en-US" l10n="NEW">Choose <emph>Tools - Customize - Keyboard</emph>.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10A59" xml-lang="en-US" l10n="NEW">In the <emph>Category</emph> list box, scroll down and open the %PRODUCTNAME Scripts entry.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10A61" xml-lang="en-US" l10n="NEW">You see entries for share (scripts in the share directory of your %PRODUCTNAME installation), user (scripts in the user directory), and the current document. Open any one of them to see the supported scripting languages.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10A65" xml-lang="en-US" l10n="NEW">Open any scripting language entry to see the available scripts. Select any script.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10A69" xml-lang="en-US" l10n="NEW">A list of the script functions will appear in the <emph>Functions</emph> list box. Select any function.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10A71" xml-lang="en-US" l10n="NEW">Click the option button for %PRODUCTNAME or Writer (or whichever application is currently open). </paragraph>
+<paragraph role="paragraph" id="par_idN10A74" xml-lang="en-US" l10n="NEW">This sets the scope of the new key combination to be applicable in all of %PRODUCTNAME or only in documents of the current module.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10A78" xml-lang="en-US" l10n="NEW">Select a key combination from the <emph>Shortcut keys</emph> list box and click <emph>Modify</emph>.</paragraph>
+</listitem>
+</list>
+<paragraph role="heading" id="par_idN1078A" xml-lang="en-US" level="2" l10n="NEW">To assign a script to an event</paragraph>
+<list type="ordered">
+<listitem>
+<paragraph role="paragraph" id="par_idN1078E" xml-lang="en-US" l10n="NEW">Choose <emph>Tools - Configure - Events</emph>.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10A9E" xml-lang="en-US" l10n="NEW">In the <emph>Category</emph> list box, scroll down and open the %PRODUCTNAME Scripts entry.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10AA6" xml-lang="en-US" l10n="NEW">You see entries for share (scripts in the share directory of your %PRODUCTNAME installation), user (scripts in the user directory), and the current document. Open any one of them to see the supported scripting languages.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10AAA" xml-lang="en-US" l10n="NEW">Open any scripting language entry to see the available scripts. Select any script.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10AAE" xml-lang="en-US" l10n="NEW">A list of the script functions will appear in the <emph>Functions</emph> list box. Select any function.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10AB6" xml-lang="en-US" l10n="NEW">Click the option button for %PRODUCTNAME or Document.</paragraph>
+<paragraph role="paragraph" id="par_idN10AB9" xml-lang="en-US" l10n="NEW">This sets the scope of the new key combination to be applicable in all of %PRODUCTNAME or only in documents of the current module.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10ABD" xml-lang="en-US" l10n="NEW">Select an event from the list and click <emph>Assign</emph>.</paragraph>
+</listitem>
+</list>
+<paragraph role="heading" id="par_idN10791" xml-lang="en-US" level="2" l10n="NEW">To assign a script to an event for an embedded object</paragraph>
+<list type="ordered">
+<listitem>
+<paragraph role="paragraph" id="par_idN10795" xml-lang="en-US" l10n="NEW">Select the embedded object, for example a chart, in your document.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10ADB" xml-lang="en-US" l10n="NEW">Choose Format - Object - Macro.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10ADF" xml-lang="en-US" l10n="NEW">In the <emph>Macros</emph> list box, open the %PRODUCTNAME Scripts entry.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10AE7" xml-lang="en-US" l10n="NEW">You see entries for share (scripts in the share directory of your %PRODUCTNAME installation), user (scripts in the user directory), and the current document. Open any one of them to see the supported scripting languages.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10AEB" xml-lang="en-US" l10n="NEW">Open any scripting language entry to see the available scripts. Select any script.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10AEF" xml-lang="en-US" l10n="NEW">A list of the script functions will appear in the <emph>Existing macros in</emph> list box. Select any function.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10AF7" xml-lang="en-US" l10n="NEW">Select an event from the list and click <emph>Assign</emph>.</paragraph>
+</listitem>
+</list>
+<paragraph role="heading" id="par_idN10798" xml-lang="en-US" level="2" l10n="NEW">To assign a script to a hyperlink</paragraph>
+<list type="ordered">
+<listitem>
+<paragraph role="paragraph" id="par_idN1079C" xml-lang="en-US" l10n="NEW">Position the cursor inside the hyperlink. </paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10B15" xml-lang="en-US" l10n="NEW">Choose Insert - Hyperlink.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10B19" xml-lang="en-US" l10n="NEW">Click the <emph>Events</emph> button.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10B21" xml-lang="en-US" l10n="NEW">Select and assign as stated above.</paragraph>
+</listitem>
+</list>
+<paragraph role="heading" id="par_idN1079F" xml-lang="en-US" level="2" l10n="NEW">To assign a script to a graphic</paragraph>
+<list type="ordered">
+<listitem>
+<paragraph role="paragraph" id="par_idN107A3" xml-lang="en-US" l10n="NEW">Select the graphic in your document. </paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10B3B" xml-lang="en-US" l10n="NEW">Choose Format - Graphics - Macro.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10B3F" xml-lang="en-US" l10n="NEW">Select and assign as stated above.</paragraph>
+</listitem>
+</list>
+<paragraph role="heading" id="par_idN107A6" xml-lang="en-US" level="2" l10n="NEW">To assign a script to a form control</paragraph>
+<list type="ordered">
+<listitem>
+<paragraph role="paragraph" id="par_idN107AA" xml-lang="en-US" l10n="NEW">Insert a form control, for example a button: Open the Form Function toolbar from the Main toolbar, click the Push Button icon, drag open a button on your document.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10B59" xml-lang="en-US" l10n="NEW">With the form control selected, choose Format - Control.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10B5D" xml-lang="en-US" l10n="NEW">Click the Events tab of the Properties dialog.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10B61" xml-lang="en-US" l10n="NEW">Click one of the <emph>...</emph> buttons to open a dialog where you can assign a script to the selected event.</paragraph>
+</listitem>
+</list>
+<paragraph role="heading" id="par_idN107AD" xml-lang="en-US" level="2" l10n="NEW">To assign a script to a control in the %PRODUCTNAME Basic dialog</paragraph>
+<list type="ordered">
+<listitem>
+<paragraph role="paragraph" id="par_idN107B1" xml-lang="en-US" l10n="NEW">Open the %PRODUCTNAME Basic dialog editor, then create a dialog with a control on it.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10B7F" xml-lang="en-US" l10n="NEW">Right-click the control, then choose <emph>Properties</emph>.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10B87" xml-lang="en-US" l10n="NEW">Click the Events tab of the Properties dialog.</paragraph>
+</listitem>
+<listitem>
+<paragraph role="paragraph" id="par_idN10B8B" xml-lang="en-US" l10n="NEW">Click one of the <emph>...</emph> buttons to open a dialog where you can assign a script to the selected event.</paragraph>
+</listitem>
+</list>
+</body>
+</helpdocument>