Index: TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/commands/URSToolsMenuContribution.java
===================================================================
--- TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/commands/URSToolsMenuContribution.java	(revision 3430)
+++ TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/commands/URSToolsMenuContribution.java	(revision 3431)
@@ -139,7 +139,7 @@
 		public void widgetSelected(SelectionEvent e) {
 			IWorkbenchWindow acWindow = TXMWindows.getActiveWindow();
 			IWorkbenchPart page = acWindow.getActivePage().getActivePart();
-			ExecuteGroovyMacro.execute(macro.getAbsolutePath(), page, CorporaView.getInstance().getTreeViewer().getSelection(), "", null);
+			ExecuteGroovyMacro.execute(macro.getAbsolutePath(), page, CorporaView.getInstance().getTreeViewer().getSelection(), "", null, null);
 		}
 	}
 
Index: TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/annotation/ImportWordPropertiesFromTableMacro.groovy
===================================================================
--- TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/annotation/ImportWordPropertiesFromTableMacro.groovy	(revision 3430)
+++ TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/annotation/ImportWordPropertiesFromTableMacro.groovy	(revision 3431)
@@ -18,6 +18,9 @@
 @Field @Option(name="properties", usage="columns to inject separated by commas", widget="String", required=true, def="p1, p2, ... , pn")
 def properties
 
+@Field @Option(name="update_edition", usage="Update the edition pages", widget="Boolean", required=true, def="false")
+def update_edition
+
 @Field @Option(name="debug", usage="Debug de the macro", widget="Boolean", required=false, def="false")
 def debug
 
@@ -32,6 +35,7 @@
 	, "outputDirectory": inputDirectory
 	, "tsvFile": tsvFile
 	, "properties": properties
-	, "debug":debug])
+	, "debug":debug] ,
+)
 
-org.txm.rcp.commands.workspace.UpdateCorpus.update(selection, TBXPreferences.getInstance().getBoolean(TBXPreferences.UPDATEEDITIONS))
+org.txm.rcp.commands.workspace.UpdateCorpus.update(selection, update_edition)
Index: TXM/trunk/org.txm.groovy.core/src/java/org/txm/groovy/core/GSERunner.java
===================================================================
--- TXM/trunk/org.txm.groovy.core/src/java/org/txm/groovy/core/GSERunner.java	(revision 3430)
+++ TXM/trunk/org.txm.groovy.core/src/java/org/txm/groovy/core/GSERunner.java	(revision 3431)
@@ -235,8 +235,8 @@
 	 * @throws ScriptException
 	 */
 	@SuppressWarnings("rawtypes")
-	public Object run(Class clazz, Map args) throws ResourceException, ScriptException {
-		return run(clazz.getCanonicalName().replace(".", "/") + ".groovy", new Binding(args));
+	public Object run(Class clazz, Map bindingArgs) throws ResourceException, ScriptException {
+		return run(clazz.getCanonicalName().replace(".", "/") + ".groovy", new Binding(bindingArgs));
 	}
 	
 	/**
@@ -250,9 +250,14 @@
 	 * @throws ScriptException
 	 */
 	@SuppressWarnings("rawtypes")
-	public Object runMacro(Class clazz, Map args) throws ResourceException, ScriptException {
+	public Object runMacro(Class clazz, Map args, Map defaultArgs) throws ResourceException, ScriptException {
 		HashMap<String, Object> arrangedMap = new HashMap<>();
-		arrangedMap.put("args", args);
+		if (args != null) {
+			arrangedMap.put("args", args);
+		}
+		if (defaultArgs != null) {
+			arrangedMap.put("defaultArgs", defaultArgs);
+		}
 		
 		
 		// Find the Groovy Script
@@ -272,6 +277,21 @@
 	
 	/**
 	 * Convenience method exactly the same as calling
+	 * run(clazz, ["args":args])
+	 * 
+	 * @param clazz
+	 * @param args
+	 * @return
+	 * @throws ResourceException
+	 * @throws ScriptException
+	 */
+	@SuppressWarnings("rawtypes")
+	public Object runMacro(Class clazz, Map args) throws ResourceException, ScriptException {
+		return runMacro(clazz, args, null);
+	}
+	
+	/**
+	 * Convenience method exactly the same as calling
 	 * run(clazz, ["args":[:]])
 	 * 
 	 * @param clazz
@@ -282,9 +302,10 @@
 	 */
 	@SuppressWarnings("rawtypes")
 	public Object runMacro(Class clazz) throws ResourceException, ScriptException {
-		HashMap<String, Object> arrangedMap = new HashMap<>();
-		arrangedMap.put("args", new HashMap<String, Object>());
-		return run(clazz.getCanonicalName().replace(".", "/") + ".groovy", new Binding(arrangedMap));
+//		HashMap<String, Object> arrangedMap = new HashMap<>();
+//		arrangedMap.put("args", new HashMap<String, Object>());
+//		return run(clazz.getCanonicalName().replace(".", "/") + ".groovy", new Binding(arrangedMap));
+		return runMacro(clazz, null, null);
 	}
 	
 	//// TODO ScriptCacheEntry is a private class...
Index: TXM/trunk/org.txm.libs.args4j/src/org/kohsuke/args4j/NamedOptionDef.java
===================================================================
--- TXM/trunk/org.txm.libs.args4j/src/org/kohsuke/args4j/NamedOptionDef.java	(revision 3430)
+++ TXM/trunk/org.txm.libs.args4j/src/org/kohsuke/args4j/NamedOptionDef.java	(revision 3431)
@@ -5,13 +5,13 @@
  */
 public final class NamedOptionDef extends OptionDef {
 	
-	private final String name;
+	private String name;
 	
-	private final String def;
+	public String def;
 	
-	private final String widget;
+	private String widget;
 	
-	private final String[] aliases;
+	private String[] aliases;
 	
 	public NamedOptionDef(Option o, boolean forceMultiValued) {
 		super(o.usage(), o.metaVar(), o.required(), o.handler(), o.multiValued() || forceMultiValued);
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/ParametersDialog.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/ParametersDialog.java	(revision 3430)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/parameters/ParametersDialog.java	(revision 3431)
@@ -58,6 +58,8 @@
 	
 	protected Map args; // store values given by another Macro, if contains all the needed values, no dialog is shown
 	
+	protected Map defaultArgs; // store additional default values of parameters (replace default values of script)
+	
 	// protected int numberOfParameters; // number of parameters to show in the dialog box (not set by 'args'), if 0 parameters no dialog is shown
 	
 	protected ArrayList<String> parametersToSetByTheUser;
@@ -83,7 +85,8 @@
 	 * @param allParameters all the scripts annotations
 	 * @param args pre-filled fields
 	 */
-	public ParametersDialog(Shell parentShell, Object bean, List<OptionHandler> allParameters, Map args) {
+	public ParametersDialog(Shell parentShell, Object bean, List<OptionHandler> allParameters, Map args, Map defaultArgs) {
+
 		super(parentShell);
 		if (bean != null) {
 			this.script = bean.getClass().getName();
@@ -91,6 +94,7 @@
 		this.parameters = new ArrayList<>();
 		this.bean = bean;
 		this.args = args;
+		this.defaultArgs = defaultArgs;
 		setShellStyle(getShellStyle() | SWT.RESIZE);
 		
 		// count the number of fields to show. If "0" then don't show the dialog, see the "open()" function
@@ -143,6 +147,7 @@
 		for (NamedOptionDef option : this.parameters) {
 			String widgetName = option.widget();
 			String stringValue = option.def();
+			
 			Object value = null;
 			if ("File".equals(widgetName) || "FileOpen".equals(widgetName)) { //$NON-NLS-1$
 				value = new File(stringValue);
@@ -553,6 +558,16 @@
 			}
 		}
 		
+		Object oDefaultArgs = null;
+		if (bean instanceof groovy.lang.Script) {
+			groovy.lang.Script script = (groovy.lang.Script) bean;
+			
+			// if the "defaultArgs" variable exists then use its values. Can be used to set a default value by another Macro
+			if (script.getBinding().hasVariable("defaultArgs")) {
+				oDefaultArgs = script.getBinding().getVariable("defaultArgs"); //$NON-NLS-1$
+			}
+		}
+		
 		final Map args;
 		if (oArgs == null || !(oArgs instanceof Map)) {
 			args = new HashMap<String, Object>();
@@ -567,6 +582,22 @@
 				script.getBinding().setVariable("args", args);
 			}
 		}
+		
+		final Map defaultArgs;
+		if (oDefaultArgs == null || !(oDefaultArgs instanceof Map)) {
+			defaultArgs = new HashMap<String, Object>();
+		}
+		else {
+			defaultArgs = (Map) oDefaultArgs;
+		}
+		
+		if (bean instanceof groovy.lang.Script) { // create the args binding if not already existing
+			groovy.lang.Script script = (groovy.lang.Script) bean;
+			if (!script.getBinding().hasVariable("defaultArgs")) {
+				script.getBinding().setVariable("defaultArgs", defaultArgs);
+			}
+		}
+		
 		Log.finest("Calling syncExec on display: " + Display.getDefault());
 		Display.getDefault().syncExec(new Runnable() {
 			
@@ -587,6 +618,9 @@
 							if (opt.option instanceof NamedOptionDef) {
 								NamedOptionDef option = (NamedOptionDef) opt.option;
 								c.getDeclaredField(option.name());
+								if (defaultArgs.containsKey(option.name())) {
+									option.def = ""+defaultArgs.get(option.name());
+								}
 							}
 						}
 						catch (NoSuchFieldException e) {
@@ -595,7 +629,7 @@
 						}
 					}
 					if (okNames) {
-						ParametersDialog dialog = new ParametersDialog(shell, bean, parser.getOptions(), args);
+						ParametersDialog dialog = new ParametersDialog(shell, bean, parser.getOptions(), args, defaultArgs);
 						if (dialog.getShell() != null) {
 							Log.finest("Activating shell:" + shell);
 							shell.setActive();
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteLastGroovyScript.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteLastGroovyScript.java	(revision 3430)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteLastGroovyScript.java	(revision 3431)
@@ -90,6 +90,6 @@
 			return;
 		}
 		
-		ExecuteGroovyScript.executeScript(currentRootDir, lastScript.getAbsolutePath(), page, selection, false, "", null);
+		ExecuteGroovyScript.executeScript(currentRootDir, lastScript.getAbsolutePath(), page, selection, false, "", null, null);
 	}
 }
\ No newline at end of file
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteGroovyMacro.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteGroovyMacro.java	(revision 3430)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteGroovyMacro.java	(revision 3431)
@@ -113,16 +113,16 @@
 			LastOpened.set(ID, new File(result));
 		}
 
-		return execute(result, page, selection, stringArgs, null);
+		return execute(result, page, selection, stringArgs, null, null);
 	}
 	
-	public static IStatus execute(String scriptpath, IWorkbenchPart page, ISelection selection, String stringArgs, HashMap<String, Object> parameters) {
+	public static IStatus execute(String scriptpath, IWorkbenchPart page, ISelection selection, String stringArgs, HashMap<String, Object> parameters, HashMap<String, Object> defaultParameters) {
 		//IPreferencesService service = Platform.getPreferencesService();
 		String scriptRootDir = Toolbox.getTxmHomePath() + "/scripts"; //$NON-NLS-1$
 		File currentRootDir = new File(scriptRootDir, "groovy/user"); //$NON-NLS-1$
 		
 		if (scriptpath.endsWith(".groovy")) {
-			return ExecuteGroovyScript.executeScript(currentRootDir, scriptpath, page, selection, false, stringArgs, parameters);
+			return ExecuteGroovyScript.executeScript(currentRootDir, scriptpath, page, selection, false, stringArgs, parameters, defaultParameters);
 		} else {
 			return ExecuteScript.executeScript(scriptpath, page, selection, stringArgs);
 		}
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteGroovyScript.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteGroovyScript.java	(revision 3430)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/handlers/scripts/ExecuteGroovyScript.java	(revision 3431)
@@ -164,7 +164,7 @@
 		String scriptRootDir = Toolbox.getTxmHomePath() + "/scripts"; //$NON-NLS-1$
 		File currentRootDir = new File(scriptRootDir, "groovy/user"); //$NON-NLS-1$
 
-		return executeScript(currentRootDir, scriptpath, page, selection, modal, stringArgs, null);
+		return executeScript(currentRootDir, scriptpath, page, selection, modal, stringArgs, null, null);
 	}
 
 	/**
@@ -196,7 +196,7 @@
 	 * @param page current active page, might be null
 	 * @param sel current selection, might be null
 	 */
-	public static IStatus executeScript(final File currentRootDir, String scriptpath, final  IWorkbenchPart page, final ISelection sel, final boolean modal, final String stringArgs, HashMap<String, Object> parameters) {
+	public static IStatus executeScript(final File currentRootDir, String scriptpath, final  IWorkbenchPart page, final ISelection sel, final boolean modal, final String stringArgs, HashMap<String, Object> parameters, HashMap<String, Object> defaultParameters) {
 		// check script
 		final File scriptfile = new File(scriptpath);
 		if (!scriptfile.exists()) {
@@ -261,6 +261,7 @@
 					binding.setProperty("MONITOR", this); //$NON-NLS-1$
 					binding.setProperty("stringArgs", stringArgs); //$NON-NLS-1$
 					if (parameters != null) binding.setProperty("args", parameters); //$NON-NLS-1$
+					if (defaultParameters != null) binding.setProperty("defaultArgs", defaultParameters); //$NON-NLS-1$
 					binding.setProperty("gse", gse);
 					Timer timer = new Timer();
 					binding.setProperty("timer", timer); //$NON-NLS-1$
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/menu/MacrosMenuContribution.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/menu/MacrosMenuContribution.java	(revision 3430)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/menu/MacrosMenuContribution.java	(revision 3431)
@@ -120,7 +120,12 @@
 		for (File f : files) {
 			if (f.getName().endsWith("Macro.groovy")) {
 				MenuItem menuItem = new MenuItem(menu, SWT.PUSH);
-				menuItem.setText(f.getName().substring(0, f.getName().length()-12).replaceAll("([A-Z])([^A-Z])", " $1$2"));
+				String name = f.getName().substring(0, f.getName().length()-12);
+				name = name.replaceAll("([0-9]++)", " $1 ");
+				name = name.replaceAll("(To)", " To ");
+				name = name.replaceAll("([A-Z]++)([^A-Z])", " $1$2");
+				
+				menuItem.setText(name);
 				menuItem.setImage(IImageKeys.getImage(IImageKeys.SCRIPT_RUN));
 				menuItem.addSelectionListener(new MacroSelectionAdapter(f));
 			} else if (f.isDirectory()) {
@@ -145,7 +150,7 @@
 		public void widgetSelected(SelectionEvent e) {
 			IWorkbenchWindow acWindow = TXMWindows.getActiveWindow();
 			IWorkbenchPart page = acWindow.getActivePage().getActivePart();
-			ExecuteGroovyMacro.execute(macro.getAbsolutePath(), page, CorporaView.getInstance().getTreeViewer().getSelection(), "", null);
+			ExecuteGroovyMacro.execute(macro.getAbsolutePath(), page, CorporaView.getInstance().getTreeViewer().getSelection(), "", null, null);
 		}
 	}
 	
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/MacroExplorer.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/MacroExplorer.java	(revision 3430)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/views/fileexplorer/MacroExplorer.java	(revision 3431)
@@ -271,7 +271,7 @@
 					IWorkbenchPart page = acWindow.getActivePage().getActivePart();
 					
 					if (selectedItem.getName().toLowerCase().endsWith(".groovy")) {
-						ExecuteGroovyMacro.execute(selectedItem.getAbsolutePath(), page, selection, "", null);
+						ExecuteGroovyMacro.execute(selectedItem.getAbsolutePath(), page, selection, "", null, null);
 					}
 					else {
 						String ext = FileUtils.getExtension(selectedItem);
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/WordPropertiestoTable.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/WordPropertiestoTable.java	(revision 3430)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/WordPropertiestoTable.java	(revision 3431)
@@ -3,7 +3,6 @@
 import java.io.File;
 import java.util.HashMap;
 
-import org.apache.commons.lang.StringUtils;
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
@@ -11,11 +10,8 @@
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.txm.Toolbox;
-import org.txm.objects.CorpusBuild;
 import org.txm.rcp.handlers.scripts.ExecuteGroovyMacro;
-import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.MainCorpus;
-import org.txm.searchengine.cqp.corpus.query.CQLQuery;
 import org.txm.utils.logger.Log;
 
 public class WordPropertiestoTable extends AbstractHandler{
@@ -34,9 +30,15 @@
 		MainCorpus corpus = (MainCorpus)first;
 
 		File script = new File(Toolbox.getTxmHomePath(), "/scripts/groovy/user/org/txm/macro/annotation/ExportWordPropertiesToTableMacro.groovy");
-		File parametersFile = new File(Toolbox.getTxmHomePath(), "/scripts/groovy/user/org/txm/macro/annotation/ExportWordPropertiesToTableMacro.properties");
+		//File parametersFile = new File(Toolbox.getTxmHomePath(), "/scripts/groovy/user/org/txm/macro/annotation/ExportWordPropertiesToTableMacro.properties");
 		
-		ExecuteGroovyMacro.execute(script.getAbsolutePath(), part, selection, "", null);
+		HashMap<String, Object> parameters = new HashMap<String, Object>();
+		
+		HashMap<String, Object> defaultParameters = new HashMap<String, Object>();
+		defaultParameters.put("properties", "frpos,frlemma");
+		defaultParameters.put("tsvFile", corpus.getName()+"_annotations.tsv");
+		
+		ExecuteGroovyMacro.execute(script.getAbsolutePath(), part, selection, "", parameters, defaultParameters);
 		return null;
 	}
 }
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/WordPropertiesFromTable.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/WordPropertiesFromTable.java	(revision 3430)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/commands/function/WordPropertiesFromTable.java	(revision 3431)
@@ -34,7 +34,11 @@
 		File script = new File(Toolbox.getTxmHomePath(),         "/scripts/groovy/user/org/txm/macro/annotation/ImportWordPropertiesFromTableMacro.groovy");
 		File parametersFile = new File(Toolbox.getTxmHomePath(), "/scripts/groovy/user/org/txm/macro/annotation/ImportWordPropertiesFromTableMacro.properties");
 
-		ExecuteGroovyMacro.execute(script.getAbsolutePath(), part, selection, "", null);
+		HashMap<String, Object> defaultParameters = new HashMap<String, Object>();
+		defaultParameters.put("properties", "frpos,frlemma");
+		defaultParameters.put("tsvFile", corpus.getName()+"_annotations.tsv");
+		
+		ExecuteGroovyMacro.execute(script.getAbsolutePath(), part, selection, "", null, defaultParameters);
 		return null;
 	}
 	
