package ij.macro;
import ij.IJ;
import ij.plugin.MacroInstaller;
import ij.plugin.Startup;
public class StartupRunner implements Runnable {
public void run(boolean batchMode) {
if (IJ.debugMode) IJ.log("StartupRunner: "+batchMode);
if (batchMode)
run();
else {
Thread thread = new Thread(this, "StartupRunner");
thread.start();
}
}
public void run() {
String macro = (new Startup()).getStartupMacro();
if (macro!=null && macro.length()>4) {
if (macro.contains("setForegroundColor"))
IJ.wait(100);
IJ.runMacro(macro);
}
MacroInstaller.autoRun();
}
}