Select windows by the end of their titles

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Select windows by the end of their titles

dinesk
Hi,
I'm trying to select windows by the end of their titles. I have many images, some ending by "essai1-x" and some by "essai2-x"... I would like to merged those ending by "essai1-x" on one side and those ending by "essai2" on the other side...
I tried to write a macro :

list = getList("window.titles");
selectWindow(title+ "essai1-1");
titleRed = getTitle;
selectWindow(title+ "essai1-2");
titleGreen = getTitle;
selectWindow(title+ "essai1-3");
titleBlue = getTitle;
run("Merge Channels...", "red=titleRed green=titleGreen blue=titleBlue gray=*None*);

list = getList("window.titles");
selectWindow(title+ "essai2-1");
titleRed = getTitle;
selectWindow(title+ "essai2-2");
titleGreen = getTitle;
selectWindow(title+ "essai2-3");
titleBlue = getTitle;
run("Merge Channels...", "red=titleRed green=titleGreen blue=titleBlue gray=*None*);


Don't work :-(

Thanks for your help.