Login  Register

Re: Log-Window - suppress and/or close

Posted by Ingo Bartholomaeus on Sep 10, 2009; 5:39pm
URL: http://imagej.273.s1.nabble.com/Log-Window-suppress-and-or-close-tp3691240p3691241.html

Thank you Wayne for the quick response,

actually I could solve both problems with the log window by your advice.

My first problem with showing-up of the log window after cancelling dialogs in macros occurred since these macros had been started by another macro initially. Within this first macro, where they are started from I now also call the second macros as

str=runMacro("macroname");         which prevents opening of the log window.

Kind regards,
Ingo


Dear Ingo,

 > Dear all,
 >
 > is there a way to suppress opening of a log window when  > aborting a macro (showing the > message: [aborted])?

How are you aborting the macro? What are you doing that causes this message to be displayed in the Log window?

 > Also I would like to suppress the (empty) log window  > after calling the following command in a macro:
 >
 > exec("cmd", "/c", "start", "explorer.exe", path)

You can work around this problem by not ignoring the string returned by
exec():

     str = exec("cmd", "/c", "start", "explorer.exe", path)

 > Alternatively it in this case I would like to close the log window using the macro.

You can close the Log window using

     if (isOpen("Log")) {
         selectWindow("Log");
         run("Close");
     }

Best regards,

-wayne