Eliminate the loadwave dialog in macro laodwave
Mike German
Macro LoadMultiRelpayFiles()
Silent 1
// Tidy up just in case
killAllGraphs()
killwaves /A/Z
string myPathName
mypathname = "E:Michael:Radio Astronomy:VLF:Eclipse study"
newpath VEM mypathname
string myWaveName
string Folder = Run_Number[0]
string /G Filename
string ShortAddress
Variable Stations = 13
Variable LoadLoop = 1
String columnInfoString =""
columnInfoString = columnInfoString + "C=1, F=8,T=4;" //column 1 is date and time
columnInfoString =columnInfoString + "C=2, F=0,T=2;" // column 2&3 are FP single precision
// Load Direct Continuum Recording
string myfilename
string /G runnumber
runnumber = Run_Number[0]
Print runnumber
ShortAddress = ":"+ runnumber + ":" + runnumber + ".txt"
LoadWave /J/B=$columnInfoString /P=VEM/R={English,1,2,2,2,"Year-Month-DayOfMonth hh:mm:ss",40} ShortAddress
myWaveName = "DirRec"
rename wave1, $myWaveName
WaveStart[0] = wave0[0]
WaveEnd[0] = wave0[numpnts(wave0)-1]
SetScale/I x waveStart[0],waveEnd[0],"dat", DirRec
print "--------------------"
Print "Wave Length: ",numpnts(wave0),"Loop Number: ",LoadLoop, "FileName: ", Filename, "Wave name: ", myWaveName
// Load Flagged Replay files
Do
IF (Station_Select[LoadLoop] == 1 ) then
killwaves/Z wave0,wave1,wave2
Filename = CallSign[LoadLoop] + "replay.txt"
ShortAddress = ":"+ Folder + ":" + Filename
LoadWave /J/B=$columnInfoString /P=VEM/R={English,1,2,2,2,"Year-Month-DayOfMonth hh:mm:ss",15} ShortAddress
myWaveName = CallSign[LoadLoop]
rename wave1, $myWaveName
Print "--------------------"
Print "Wave Length: ",numpnts(wave0),"Loop Number: ",LoadLoop, "FileName: ", Filename, "Wave name: ", myWaveName
SetScale/I x waveStart[0],waveEnd[0],"dat", $myWaveName
EndIf
LoadLoop = LoadLoop + 1
While (LoadLoop !=14)
openGraphs()
End
March 7, 2015 at 05:38 pm - Permalink
adding "/A" did the trick. I must have looked through that help file, I don't know how many times, and there it was right at the top of the list all along! Problem solved.
March 8, 2015 at 04:11 am - Permalink