Statistiques
| Révision :

root / tmp / org.txm.practically.rcp / doc / macroEdit.html @ 3214

Historique | Voir | Annoter | Télécharger (2,04 ko)

1
<html>
2
From the edit dialog, you can:
3
<br>
4
<ul>reorder commands in the macro
5
</ul>
6
<ul>remove commands
7
</ul>
8
<ul>add new commands
9
</ul>
10
<ul>edit commands that have data associated with them (ex. the Find
11
        command).
12
</ul>
13
<br>The Edit dialog also allows you to add a new macro id to a
14
command that didn't previously have an associated id (thus turning it
15
into a persistent command), or alter (or remove) the id of an existing
16
command.
17
<br>Adding new commands to the macro requires that you have some
18
knowledge of the commands. There is a filter above the
19
<bold>Available Commands</bold>
20
list that defaults to showing only edit commands (based on looking at
21
categories). Some commands are not appropriate to a macro, but it's
22
impossible for me to tell what they are, so you may have to experiment.
23
<h3>Special macro helper commands</h3>
24
<ul>Mark selection start - set a 'mark' at the current selection
25
        start, or at the caret pos if no selection
26
</ul>
27
<ul>Mark selection end - set a 'mark' at the current selection end,
28
        or at the caret pos if no selection
29
</ul>
30
<ul>Move cursor to mark - Set the editor cursor to the current mark
31
        position
32
</ul>
33
<ul>Insert string - this is the workhorse command used to add text.
34
        Can contain carriage returns.
35
</ul>
36
<ul>Find - perform various kinds of text searching
37
</ul>
38
<ul>Styled Text commands - These are commands I've added to the
39
        system since they aren't commands by default. Actions like "move cursor
40
        right" are supported by the StyledText widget but aren't mapped as key
41
        bindings.
42
</ul>
43
<ul>Macro script - You can write whatever scripts you'd like using
44
        beanshell. I pass in several variables for the editor that should be
45
        useful.
46
</ul>
47
<br> The Mark commands are provided as a way to maintain some state
48
while other operations are performed without requiring scripting. For
49
example, to comment a selected area, you could record a sequence of
50
commands like:
51
<ol>mark selection start
52
</ol>
53
<ol>move cursor right (puts cursor at end of selection
54
</ol>
55
<ol>insert string "*/"
56
</ol>
57
<ol>move cursor to mark
58
</ol>
59
<ol>insert string "/*"
60
</ol>
61

    
62
</html>