|
Hi all,
I am not familiar with Macros, so I hope this is not too obvious. I have used the Record command to automatize a number of steps I use regularly. This is where I get stuck: I recorded the macro with a file called lets say picture0451. I do some stack / hyperstack, change the color of the channels I have, and everything goes very smoothly. Now, when I split the image I have into its 3 constitutive channels, I get 3 new windows called "C-picture0451", "C2-picture0451" and "C3-picture0451". When I do a z project to each of these, they are renamed "MAX_C-picture0451", "MAX_C2-picture0451" and "MAX_C3-picture0451". The problem is that the macro records this exact name, so when I want to do the same thing with a file now called "picture0333" it suddenly stops at the command selectWindow("C-picture0451") and tells me it cannot find "C-picture0451". That is because the macro I recorded stored the exact name of the first file I used to create the macro. Is there a way to make a general name that would make the macro continue regardless of the name of the file I am adding? I know in Windows you can search all names by using the asterisk (i.e. search cat*.* will search any file name and any type that has the letters cat on it). I tried writing selectWindow("C*.*") but nothing happened. Any suggestions?
Thanks a lot for the help!
|