/www/tags/NOV_07_2009/htdocs/42docs/users-guide/recording-macros.html
HTML | 64 lines | 64 code | 0 blank | 0 comment | 0 complexity | 1885a57daa94097b1ede185fbd66c54c MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
- <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Recording Macros</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="jEdit 4.2 User's Guide"><link rel="up" href="using-macros.html" title="Chapter 8. Using Macros"><link rel="previous" href="using-macros.html" title="Chapter 8. Using Macros"><link rel="next" href="running-macros.html" title="Running Macros"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Recording Macros</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="using-macros.html">Prev</a> </td><th width="60%" align="center">Chapter 8. Using Macros</th><td width="20%" align="right"> <a accesskey="n" href="running-macros.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="recording-macros"></a>Recording Macros</h2></div></div><div></div></div><p>
- The simplest use of macros is to record a series of key strokes and
- menu commands as a BeanShell script, and play them back later.
- While this doesn't let you take advantage of the full power of
- BeanShell, it is still a great time saver and can even be used to
- “<span class="quote">prototype</span>” more complicated macros.
- </p><p>
- <span><b class="guimenu">Macros</b></span>><span><b class="guimenuitem">Record Macro</b></span>
- (shortcut: <tt class="keycap">C+m C+r</tt>) prompts
- for a macro name and begins recording.
- </p><p>
- While recording is in progress, the string “<span class="quote">Macro
- recording</span>” is displayed in the status bar. jEdit records the
- following:
- </p><div class="itemizedlist"><ul type="disc"><li><p>Key strokes</p></li><li><p>Menu item commands</p></li><li><p>Tool bar clicks</p></li><li><p>All search and replace operations, except incremental
- search</p></li></ul></div><p>
- Mouse clicks in the text area are <span class="emphasis"><em>not</em></span> recorded;
- use text selection commands or arrow keys instead.
- </p><p>
- <span><b class="guimenu">Macros</b></span>><span><b class="guimenuitem">Stop Recording</b></span>
- (shortcut: <tt class="keycap">C+m C+s</tt>) stops
- recording. It also switches to the buffer containing the recorded macro,
- giving you a chance to check over the recorded commands and make any
- necessary changes. When you are happy with the macro, save the buffer and it
- will appear in the <span><b class="guimenu">Macros</b></span> menu. To discard the macro,
- close the buffer without saving it.
- </p><p>
- The file name extension <tt class="filename">.bsh</tt> is
- automatically appended to the macro name, and all spaces are converted
- to underscore characters, in order to make the macro name a valid file
- name. These two operations are reversed when macros are displayed in the
- <span><b class="guimenu">Macros</b></span> menu; see <a href="organizing-macros.html" title="How jEdit Organizes Macros">the section called “How jEdit Organizes Macros”</a>
- for details.
- </p><p>
- If a complicated operation only needs to be repeated a few
- times, using the temporary macro feature is quicker than saving a new
- macro file.
- </p><p>
- <span><b class="guimenu">Macros</b></span>><span><b class="guimenuitem">Record Temporary
- Macro</b></span> (shortcut: <tt class="keycap">C+m C+m</tt>) begins
- recording to a buffer named <tt class="filename">Temporary_Macro.bsh</tt>.
- Once recording of a temporary macro is complete, jEdit does not display
- the buffer containing the recorded commands, but the name
- <tt class="filename">Temporary_Macro.bsh</tt> will be visible on any list of
- open buffers. By switching to that buffer, you can view the commands,
- edit them, and save them if you wish to
- a permanent macro file. Whether or not you look at or save the temporary
- macro contents, it is immediately available for playback.
- </p><p>
- <span><b class="guimenu">Macros</b></span>><span><b class="guimenuitem">Run Temporary
- Macro</b></span> (shortcut: <tt class="keycap">C+m C+p</tt>) plays
- the macro recorded to the <tt class="filename">Temporary_Macro.bsh</tt> buffer.
- </p><p>
- Only one temporary macro is available at a time. If you begin recording
- a second temporary macro, the first is erased and cannot be recovered
- unless you have saved the contents to a file with a name other than
- <tt class="filename">Temporary_Macro.bsh</tt>.
- If you do not save the temporary macro, you must keep the buffer
- containing the macro script open during your jEdit session. To have the
- macro available for your next jEdit session, save the buffer
- <tt class="filename">Temporary_Macro.bsh</tt> as an ordinary macro with a
- descriptive name of your choice. The new name will then be displayed in
- the <span><b class="guimenu">Macros</b></span> menu.
- </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="using-macros.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="using-macros.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="running-macros.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 8. Using Macros </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Running Macros</td></tr></table></div></body></html>