Script incubator

From Freeplane - free mind mapping and knowledge management software
Revision as of 10:46, 19 February 2016 by Zipizap (talk | contribs) (adding scripts nodeWidth_Increment.groovy nodeWidth_Decrement.groovy)

A collection of scripts that might need a review before adding them to the "official" Scripts collection.

Feel free to add your own scripts to this page. If you give script a name using wiki text like

<groovy name="yourScriptName">
 your script
</groovy>

an extra download button is created for it, and it can be downloaded directly from this page.


Pair of scripts to increase/decrease the node-width (can be used with shortcuts!)

Since freeplane 1.5.x we can adjust the node-width with ALT+mouse-wheel, but there is currently no way to make it with keyboard shortcuts.

So these scripts aim at increasing/decreasing the node-width (the same way that ALT-mout-wheel would do), but by being scripts they will have a menu entry in "Tools/Scripts/Node Width_Increase" and "Tools/Scripts/Node Width_Decrease", making possible to create a shortcut to these menu entries, and so, to adjust the node-width with keyboard shortcuts.

How to install the scripts

  1. Download the 2 scripts from http://freeplane.sourceforge.net/wiki/index.php/Script_incubator and put them inside the directory "<freeplane-user-dir>/scripts" (you can open "<freeplane-user-dir>" clicking in "Tools/Open user directory")
  2. Restart Freeplane - Verify that the 2 new scripts appear in these 2 new menu-entries "Tools/Scripts/Node Width_Increase" and "Tools/Scripts/Node Width_Decrease"
  3. [optional] Assign a shortcut-key to each of the 2 menu-entries (hold CTRL while clicking a menu-entry)


Hope it helps :)


<groovy name="NodeWidth_Increase.groovy"> // @ExecutionModes({ON_SELECTED_NODE})

// zipizap, Fev2016 // Trying to solve this thread discussion [1] // Inspired by this node-width sample code [2] // Dedicated to the great and friendly freeplane community :) // // [1] https://sourceforge.net/p/freeplane/discussion/758437/thread/8f1d0faa/ // [2] https://sourceforge.net/p/freeplane/discussion/758437/thread/108a5c74/#2d6a

node.style.minNodeWidth += 9 node.style.maxNodeWidth = node.style.minNodeWidth </groovy>

<groovy name="NodeWidth_Decrease.groovy"> // @ExecutionModes({ON_SELECTED_NODE})

// zipizap, Fev2016 // Trying to solve this thread discussion [1] // Inspired by this node-width sample code [2] // Dedicated to the great and friendly freeplane community :) // // [1] https://sourceforge.net/p/freeplane/discussion/758437/thread/8f1d0faa/ // [2] https://sourceforge.net/p/freeplane/discussion/758437/thread/108a5c74/#2d6a

node.style.minNodeWidth -= 9 node.style.maxNodeWidth = node.style.minNodeWidth </groovy>


Author: User:zipizap