Scripting %PRODUCTNAME text/shared/guide/scripting.xhp UFI: new scripting framework feature assigning scripts macros;scripting Basic;scripting BeanShell scripting JavaScript JavaBeans Java;scripting programming;scripting scripting in programming Scripting %PRODUCTNAME You can assign custom scripts (macros) to menu items, icons, dialog controls, and events in %PRODUCTNAME. %PRODUCTNAME supports the following scripting languages: %PRODUCTNAME Basic Java JavaScript BeanShell To assign a script to a new menu entry Choose Tools - Customize, and click the Menu tab.UFI: may be a step is missing here and in the other steps. Test as soon as 680 can display the dialog - currently GPF In the Category list box, scroll down and open the %PRODUCTNAME Scripts entry. 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. Open any scripting language entry to see the available scripts. Select a script. A list of the script functions appears in the Functions list box. Select a function. Click New to create a new menu assignment. The new menu entry appears in the Menu entries list box. Click the menu entry and enter text to rename the entry. To assign a script to a key combination Choose Tools - Customize - Keyboard. In the Category list box, scroll down and open the %PRODUCTNAME Scripts entry. 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. Open any scripting language entry to see the available scripts. Select any script. A list of the script functions will appear in the Functions list box. Select any function. Click the option button for %PRODUCTNAME or Writer (or whichever application is currently open). This sets the scope of the new key combination to be applicable in all of %PRODUCTNAME or only in documents of the current module. Select a key combination from the Shortcut keys list box and click Modify. To assign a script to an event Choose Tools - Configure - Events. In the Category list box, scroll down and open the %PRODUCTNAME Scripts entry. 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. Open any scripting language entry to see the available scripts. Select any script. A list of the script functions will appear in the Functions list box. Select any function. Click the option button for %PRODUCTNAME or Document. This sets the scope of the new key combination to be applicable in all of %PRODUCTNAME or only in documents of the current module. Select an event from the list and click Assign. To assign a script to an event for an embedded object Select the embedded object, for example a chart, in your document. Choose Format - Object - Macro. In the Macros list box, open the %PRODUCTNAME Scripts entry. 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. Open any scripting language entry to see the available scripts. Select any script. A list of the script functions will appear in the Existing macros in list box. Select any function. Select an event from the list and click Assign. To assign a script to a hyperlink Position the cursor inside the hyperlink. Choose Insert - Hyperlink. Click the Events button. Select and assign as stated above. To assign a script to a graphic Select the graphic in your document. Choose Format - Graphics - Macro. Select and assign as stated above. To assign a script to a form control 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. With the form control selected, choose Format - Control. Click the Events tab of the Properties dialog. Click one of the ... buttons to open a dialog where you can assign a script to the selected event. To assign a script to a control in the %PRODUCTNAME Basic dialog Open the %PRODUCTNAME Basic dialog editor, then create a dialog with a control on it. Right-click the control, then choose Properties. Click the Events tab of the Properties dialog. Click one of the ... buttons to open a dialog where you can assign a script to the selected event.