Login  Register

Re: isOpen functionality

Posted by Nathaniel Ryckman on Jun 14, 2011; 4:56pm
URL: http://imagej.273.s1.nabble.com/isOpen-functionality-tp3684257p3684259.html

isOpen("Title")
Returns true if the window with the specified title is open.

http://rsbweb.nih.gov/ij/developer/macro/functions.html

I recommend creating a plugin. The Macro language is run from a Java program. The Macro language doesn't offer as many tools as Java and can be buggy. The Macro language is meant for creating simple programs that will help a user avoid using the menu manually. It's apparently not meant for full-fledged programs.

A plugin, on the other hand, is made from pure Java. It runs from a JVM (Java bytecode); thus, you have almost unlimited control if you make a plugin rather than a Macro.

To summarize:

Assembly->JVM->Java->Macro Language

bds81175 wrote
I have a set of ImageJ macros that I want to have read a .txt file and process based on the files contents.  Unfortunately, I want to have multiple PC's working with the same file and I don't want them tripping over each other when the file gets opened and read by one and another tries to do the same.  I see the isOpen command but for the life of me I can't get it to actually return a TRUE flag.  Is there a trick to this?  What's the best way to keep the macros running while using the same file?