Difference between revisions of "External script file execution"

From Freeplane - free mind mapping and knowledge management software
m
(Undo revision 651 by Olivia (Talk) spam)
Line 2: Line 2:
  
 
*The list of ''script directories'' is configurable in the config file (default: <tt>scripts</tt>, i.e. directory <tt>scripts</tt> in the freeplane user home).  
 
*The list of ''script directories'' is configurable in the config file (default: <tt>scripts</tt>, i.e. directory <tt>scripts</tt> in the freeplane user home).  
*Matching scripts are listed in the ''Extra'' menu [http://essaywritingservices.org/index.php writing service] in a submenu ''Scripts''.
+
*Matching scripts are listed in the ''Extra'' menu in a submenu ''Scripts''.
 
*Due to the flexible standard hotkey assignment it's possible to create hotkeys for these scripts.
 
*Due to the flexible standard hotkey assignment it's possible to create hotkeys for these scripts.
  
For each script there is a submenu with three menu entries for [http://cvresumewriters.com/ cv writer]:  
+
For each script there is a submenu with three menu entries:  
  
 
*''Execute for one selected node'': This will invoke the script for one selected node (arbitrarily choosen), i.e. if three nodes are selected, it will be executed once, with the <tt>node</tt> variable set to one of the selected nodes. Since setting of <tt>node</tt> is not really predictable this variable should not be used.  
 
*''Execute for one selected node'': This will invoke the script for one selected node (arbitrarily choosen), i.e. if three nodes are selected, it will be executed once, with the <tt>node</tt> variable set to one of the selected nodes. Since setting of <tt>node</tt> is not really predictable this variable should not be used.  

Revision as of 19:38, 31 May 2010

There is a mechanism to load and execute scripts from script directories matching a given name scheme (hardcoded: ".*\.groovy").

  • The list of script directories is configurable in the config file (default: scripts, i.e. directory scripts in the freeplane user home).
  • Matching scripts are listed in the Extra menu in a submenu Scripts.
  • Due to the flexible standard hotkey assignment it's possible to create hotkeys for these scripts.

For each script there is a submenu with three menu entries:

  • Execute for one selected node: This will invoke the script for one selected node (arbitrarily choosen), i.e. if three nodes are selected, it will be executed once, with the node variable set to one of the selected nodes. Since setting of node is not really predictable this variable should not be used.
  • Execute for all selected nodes: This will invoke the script on every selected node, i.e. if three nodes are selected, it will be executed three times, once for each node with the node variable set to the respective node.
  • Execute for all selected nodes, recursively: This will invoke the script on every selected node and recursively on all of its children.
    • Note: If a node and a child node are both selected, then the script is invoked on the child node twice.
  • To execute a script on all nodes in a map one has to select the root node and execute the script recursively.
  • Errors while loading or while execution of scripts are handled by error message popups. (See resources ExecuteScriptError.text and ReadScriptError.text.)