Code: Select all
FileNew()
FileType(4)
ForFilesIn("D:\macro_test\*.csv",A)
VAR_C=Request("fname")
Legend(1,"VAR_C")
NextFile
1. Set each curve name to the file name. Right now it sets the name of the current file to curve 1. I can't find any documentation on numeric variables and how I can use them to update the curve number each time through the loop.
2. Is it possible to do any kind of string manipulation on string variables (such as VAR_C) so I can strip off the file extension, or use only part of the file name, etc?
3. When it opens a file, it asks me to specify which columns to plot. I want to set it to alternating x,y columns, and choose all the columns. Can this be automated so I don't have to set these options and click OK for each file?
And one unrelated question. Is it possible to specify a default font type for the macro editor? I prefer monospace fonts for scripting. But right now I have to set the font type every time I open the editor.