How to add a string to a path of file which is changing in each loop in imagej macro language?

I have some csv files that are saved in my computer like x1,x2, x3, and so on. I want to call them and open them in for loop. here is my code:


The error i get: This is not a tab or comma delimited time.
I tried this one: 
but didnot work as well.

Hey @Zeynab_Mousavi,

would you mind sharing on of the files? Furthermore, you are setting the variable xn = ... in your first line, but in the second line, your variable is called xj. May that be a typo?


1 Like

@haesleinhuepf I made a mistake writing it here. Here the code I am running and error:

@haesleinhuepfx3.csv (9.1 KB)

Would you mind sharing the file x3.csv? Furthermore, why is there a curly bracket in line 5? Last but not least, why does the folder start with a / ?

1 Like

@haesleinhuepf Thanks so much for your quick response. I fixed all but I get the same error. I shared the file.

Is this the same script as this one?

1 Like

@Andrew_Shum Yes. But I am curious to know the answer to my question regardless of other parts of the code.

1 Like