The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 choose the path before opening the fdlog dialog
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

coll@inia.

Spain
125 Posts

Posted - 05/17/2009 :  4:22:59 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

coll@inia.

Spain
125 Posts

Posted - 05/19/2009 :  12:18:21 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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


Go to Top of Page

Laurie

USA
404 Posts

Posted - 05/19/2009 :  3:10:33 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

coll@inia.

Spain
125 Posts

Posted - 05/20/2009 :  07:41:09 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000