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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Automatic selection of 2nd file

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
rmtruji Posted - 04/21/2004 : 5:25:01 PM
I have a script that currently prompts the user to select a file using fdlog.MultiOpen(). Once the OK button is selected in the "Open" window, I want the script to automatically select a 2nd file from the same directory that has the same name as the original file plus underscore DR (filename_DR). Does anyone know how I can do this?
2   L A T E S T    R E P L I E S    (Newest First)
sammi.song Posted - 04/22/2004 : 10:37:55 PM
Hi rmtruji,

Maybe your selected files all have the 2nd files with a suffix "_DR". I hope the following scripts would be useful:

fdlog.MultiOpen();
loop (ii,1,FDlog.MultiOpen.Count)
{
win -t data; //open a new worksheet
Fdlog.Get(A, ii); //get the selected filename respectively
open -w %A; //import the current selected file into wks
%w=%H; //backup this wks name
win -t data; //open a new worksheet
win -a %H; //active this new wks
open -w %w_DR.dat; //import the data file named %A_DR.dat
};

Thanks,
Sammi
jlang Posted - 04/22/2004 : 3:49:10 PM
This might not work but you may try:

open -w %A_DR; // import the data named %A_DR

This is under the assumption that your first filename is passed to %A.

HTH

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000