Sorry. I didn't see that you had replied to my message.
isOpen("title") only checks to see if there is a window that is currently open with a specific title. It doesn't actually check the file to see if it's open.
Here, I found the direct code you will need to change the read only status of the file:
http://www.mkyong.com/java/how-to-make-a-file-read-only-in-java/"File file = new File("c:/file.txt");
if(file.canWrite()){
//mark this file as read only, since jdk 1.2
file.setReadOnly();
Your code here.....
//revert the operation, mark this file as writable, since jdk 1.6
file.setWritable(true);
}else{
Do nothing.....
}
"
imageJ has a plugin editor. It can even attempt to convert your macro into a plugin.
Either way, you are going to need to create a plugin if you are interested in changing permissions on files. Either hire a programmer, get a programmer friend to convert your macro, or learn to write a plugin yourself.
bds81175 wrote
Don't you still have to open the shared file to update it with the data from your file1.txt? I was looking at the isOpen function and it doesn't appear to do anything (can't get it to return a TRUE at all). I'm not familiar enough with stuff to create separate plugins. I'll start down that path but I would rather have something quick and dirty if I can.