Hi,
The below script loops through files in two lists to check which of them match. If they do, the 'tagger' function is used to manipulate the files. I created this code for a GUI in which to test its functionality I chose four files (two for lf and two for lg). The probem is that when the condition is evaluated to true, the 'tagger' script only runs for the first of the matching two files, instead of all four matching files. Was wondering if I was missing something?
commenceTaggingScript2 = Expr(
For(p = 1, p <= n items(lf), p++,
For(q = 1, q <= nitems(lg), q++,
if (Left(lf[p], Length(lf[p]) - 4) == Left(lg[q], Length(lg[q]) - 8), print("Sliced Lf: " || Left(lf[p], Length(lf[p]) - 4)); print("Sliced lg: " || Left(lg[q], Length(lg[q]) - 8)); tagger(selectedDirlf || lf[p], selectedDirlg || lg[q]) , print("Not matching"));
);
);
); I would run the JSL Debugger on your code and step through the code and see what actions JMP is taking at the key points in your code.