Author |
Topic  |
|
coll@inia.
Spain
125 Posts |
Posted - 05/17/2009 : 4:22:59 PM
|
Origin Ver. and Service Release 8 pro Operating System: win XP
I would like the same fdlog directory appear when opening an *.opj file that contains some script to select a file of data to import. The directory to select the file is always the same. It contains data from an spectrophotometer ("C:\genlite\protocols\540\"). Then I can select one of the files there for import. The file is always of the type *P.001.
I am doing it manually now, since each time the fdlog directory opens in a different directory (probably the last opened in WXP).
I am using the following script to open and select the file: getfile *P.001; //filters the file types required among others present in the directory impFile fname:="%B%A"; //imports the selected file
Can I made the fdlog dialog to open always in the same, above- mentioned directory with some script?
Thanks, julio |
|
Laurie
USA
404 Posts |
Posted - 05/18/2009 : 11:11:53 AM
|
Hi Julio,
Please try the following script:
fdlog.reset(); fdlog.addtype("[User (*.001)] *.001"); fdlog.path$="C:\genlite\protocols\540\"; fdlog.open(A); impFile fname:="%(fdlog.path$)%A";
Laurie
OriginLab Technical Support |
 |
|
coll@inia.
Spain
125 Posts |
Posted - 05/19/2009 : 12:18:21 PM
|
dear Laurie, Many thanks fo the script. It works!!!
Just another point, how can I make it to show only the files *P.001 and not all *.001. The spectrophotometer produces an *W.001 file for each of the *P.001 files into the same directory.
Any other wonderful script?
Thanks again, julio
|
 |
|
Laurie
USA
404 Posts |
Posted - 05/19/2009 : 3:10:33 PM
|
Hi Julio,
Just modify this one line to the following: fdlog.addtype("[User (P*.001)] P*.001");
You can put whatever you want in the square brackets, [ ]. That is what shows in the Files of type list. The P*.001, which follows what is in the square brackets, is what determines what files get shown.
Laurie
OriginLab Technical Support |
 |
|
coll@inia.
Spain
125 Posts |
Posted - 05/20/2009 : 07:41:09 AM
|
Hi Laurie, YES, it also works!
Sometime ago I tried to make a similar script but for some reason I could not get it to work.
Now is fine, thanks so much, sincerely julio |
 |
|
|
Topic  |
|