Hello all,
I've tried to assemble a script for opening a series of files (.dx) and changing the text from one of the columns on each file. I manage to make it work for one or two files individually but if I try a set of four an infinite loop begins. Can anybody please help? There is a chance that the issue is with the files but I would like to vet the script first since I'm a novice at jsl. Ideally, I would like to save the files not as jmp but as dx also.
Files = Pick File( "Select File(s)", "G:\Retention Compliant\Research\Analytical\Projects\IR database", {"All Files|*"}, 1, 0, "", "multiple" );
For( i = 1, i <= N Items( Files ), i++,
Try( dt = Open( Files[i], "text" ) );
wait( 0 );
For( n = 1, n <= N Items (Files), n++,
colList = dt << get column names( character, string );
For( i = 1, i <= N Items( colList ), i++,
selRows = dt << get rows where(
Column( dt, colList[i] )[Row()] == "##YUNITS= % Transmittance" | Column( dt, colList[i] )[Row()] == "##YUNITS= % T"
);
If( N Rows( selRows ) > 0,
Column( dt, colList[i] )[selRows] = "##YUNITS= % T";
);
);
) );