Hi,
Your script does not work as expected because the "Open" dialog (the one you used to select files) is not brought up by the fdlog object, but the "impASC" x-function because you did not specify file name.
In fact, you could try to use the dlgFile x-function(http://www.originlab.com/doc/X-Function/ref/dlgFile) instead, then the script would be something like below:
newbook;
dlgfile group:=ASCII multi:=1;
string file$, fileName$;
loop(ii, 1, fname.GetNumTokens(CRLF))
{
file$ = fname.GetToken(ii, CRLF)$;
fileName$ = file.GetFileName(1)$;
impASC fname:=file$ options.ImpMode:=2 options.FileStruct.NumericSeparator:=1;
cell(ii,1)$ = fileName$;
}
Kathy
Originlab