Scripting: Difference between revisions

From FreeMind
Jump to navigationJump to search
(→‎Implementation: block expansion of the quot character entity in the VALUE)
(expand a bit)
Line 4: Line 4:


==Menu==
==Menu==
* Tools > Evaluate
* Tools > Script Editor
* Tools > Script Editor


Line 10: Line 11:


==Using==
==Using==
New scripts can be created using the script editor. Alternatively, you can plainly create an attribute whose name starts with "script" such as "script2"; such an attribute is understood by FreeMind to be a script.
New scripts can be created using the script editor, available from the menu Tools > Script Editor. Alternatively, you can plainly create an attribute whose name starts with "script" such as "script2"; such an attribute is understood by FreeMind to be a script.
 
To run a script, use the menu Tools > Evaluate or press Alt + F8. Alternatively, you can run a script from the script editor, using its menu Actions > Run. The Run function of the script editor shows the results of the execution in the pane at the bottom, and it shows error messages there, if any.


==Implementation==
==Implementation==

Revision as of 09:09, 23 August 2010

FreeMind 0.9.0 beta series has a scripting facility using Groovy.

To find out about it, see FreeMind 0.9.0: The New Features.

Menu

  • Tools > Evaluate
  • Tools > Script Editor

Keyboard

  • Alt + F8: run a script

Using

New scripts can be created using the script editor, available from the menu Tools > Script Editor. Alternatively, you can plainly create an attribute whose name starts with "script" such as "script2"; such an attribute is understood by FreeMind to be a script.

To run a script, use the menu Tools > Evaluate or press Alt + F8. Alternatively, you can run a script from the script editor, using its menu Actions > Run. The Run function of the script editor shows the results of the execution in the pane at the bottom, and it shows error messages there, if any.

Implementation

Scripts are stored in an attribute whose name reads "script" followed with a numeral, meaning in the attribute of the attribute function, not in the attribute of XML.

The script attributes are probably distinguished from non-script attributes by their starting with "script".

An example of storage in XML:

<node TEXT="hello">
<attribute NAME="script1" VALUE="=node.getNodeLevel() + &quot; &quot; + node.getText()"/>
</node>

See also