Index: trunk/FACT++/scripts/takeRun.js
===================================================================
--- trunk/FACT++/scripts/takeRun.js	(revision 18730)
+++ trunk/FACT++/scripts/takeRun.js	(revision 18731)
@@ -126,5 +126,5 @@
 }
 
-function takeRun(type, count, time)
+function takeRun(type, count, time, func)
 {
     if (!count)
@@ -133,8 +133,6 @@
         time = -1;
 
-    var custom = typeof(type)=="function";
-
     var nextrun = sub_startrun.get().obj['next'];
-    dim.log("Take run %3d".$(nextrun)+": N="+count+" T="+time+"s ["+(custom?"custom":type)+"]");
+    dim.log("Take run %3d".$(nextrun)+": N="+count+" T="+time+"s ["+type+"]");
 
     // FIXME: Replace by callback?
@@ -209,7 +207,7 @@
         if (start)
         {
-            dim.send("MCP/START", time, count, custom?"custom":type);
-            if (custom)
-                type();
+            dim.send("MCP/START", time, count, type);
+            if (typeof(func)=="function")
+                func();
         }
 
