Login  Register

Stop Results Table taking Focus

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Stop Results Table taking Focus

Cameron Nowell-2
18 posts
Hi All,

I have a macro that measures membrane intensities in a time series, all works exactly as I want. But it does take a while (even in batch mode) so it would be nice to have it run in the background while the user is doing other things (grant rebuttals, paper writing etc). The problem is that the results table keeps taking focus from other programs which results in send a very strange combination of key presses to ImageJ, breaking the run.

Any tips would be greatly appreciated

Cheers

Cam



Cameron J. Nowell
Research Facilities Manager

Monash Institute of Pharmaceutical Sciences
Monash University
399 Royal Parade
(Mail address: 381 Royal Parade)
Parkville, VIC, 3052
Australia

Email: [hidden email]<mailto:[hidden email]>
Mobile: +61 422882700
Office: +61 9903 9587

LinkedIn: Profile<http://au.linkedin.com/pub/cameron-nowell/23/57/884/>
Research Gate:  Profile<http://www.researchgate.net/profile/Cameron_Nowell>


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Stop Results Table taking Focus

Cameron Nowell-2
18 posts
Hi Wayne,

Your code worked perfectly fine, then i tried adding mine into it and it worked fine too.

After a bit of looking through my code I found the problem. I had a selectWindow("Results"); command in there. Took it out and everything works fine now. Its usually always something simple:)

Thanks

Cam

________________________________________
From: Rasband, Wayne (NIH/NIMH) [E] [[hidden email]]
Sent: Saturday, July 13, 2013 5:12 AM
To: Cameron Nowell
Subject: Re: Stop Results Table taking Focus

Dear Cameron ,

On Jul 11, 2013, at 8:27 PM, Cameron Nowell wrote:

> Hi All,
>
> I have a macro that measures membrane intensities in a time series, all works exactly as I want. But it does take a while (even in batch mode) so it would be nice to have it run in the background while the user is doing other things (grant rebuttals, paper writing etc). The problem is that the results table keeps taking focus from other programs which results in send a very strange combination of key presses to ImageJ, breaking the run.

I am not able to reproduce this problem on my Mac laptop using this simple test macro. The Results table does not take focus from other programs when this macro is running. How does it work on your system?

  setBatchMode(true);
  newImage("Untitled", "8-bit ramp", 500, 500, 1);
  for (i=0; i<100; i++) {
     run("Measure");
     wait(1000);
  }

Best regards,

-wayne







--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html