\r
// get a list of all LVDT waves (could be deflection as well, they always come in a pair)\r
sList=WaveList("*LVDT*", ";", "")\r
+ \r
// iterate through all the LVDT waves\r
for(iCount=0; iCount<ItemsInList(sList); iCount+=1)\r
// create the wave names as string\r
// treat the filename as a key-value list with '.' as a separator\r
// use the first entry (ie 0) as the filename without extension\r
sWaveLVDT=StringFromList(0, StringFromList(iCount, sList), ".")\r
-\r
+ \r
// treat the filename as a key-value list with 'LVDT' as a separator\r
// use the first entry (ie 0) as the first part of the filename\r
sFileName1=StringFromList(0, sWaveLVDT, "LVDT")\r
sFileName2=StringByKey("VD", sFileName2, "T")\r
// then we create the wave names as follows:\r
sWaveDeflection=sFileName1+"deflection"+sFileName2\r
+ \r
sWaveCombined=sFileName1+"_"+sFileName2\r
+ \r
// END: the following works in Igor 4 and up\r
\r
// create the waves we need\r
// END: the following only works in Igor 5 and up\r
sNote=note(wLVDT)\r
// in order to get the correct number of lines in the note, we have to specify the EOF as \r\n\r
- for(iCount=0; iCount<ItemsInList(sNote, "\r\n");iCount+=1)\r
+ for(iLine=0; iLine<ItemsInList(sNote, "\r\n");iLine+=1)\r
// print every line to the output file\r
- fprintf iRefNum, StringFromList(iCount, sNote, "\r\n")\r
+ fprintf iRefNum, StringFromList(iLine, sNote, "\r\n")\r
// add a CR/LF for every but the last line\r
- if(iCount<ItemsInList(sNote, "\r\n")-1)\r
+ if(iLine<ItemsInList(sNote, "\r\n")-1)\r
fprintf iRefNum, "\r\n"\r
endif\r
endfor\r