|T O P I C R E V I E W
||Posted - 05/16/2012 : 08:40:39 AM
Operating System: Windows 7 Professional
my LabTalk scripts run with a customized toolbar button. The first thing that happens after clicking on the button is this:
The ImportASC window pops up and I can select a file to import. If I choose more than one file to Import, all the files are imported into one workbook. Is there a way to import several files into several workbooks, without having to open several ImportASC windows. It would be perfect if I could click the button once, select all the files I need and import all these files in seperate workbooks.
And I have another question. Is it possible to somehow save the settings I need. Maybe within a LabTalk script. The script I'm currently working on will be used by many people who shouldn't be able to change any of these settings, in order for the script to work properly.
Thank you for your help,
|2 L A T E S T R E P L I E S (Newest First)
||Posted - 05/21/2012 : 02:38:33 AM
thanks for your answer. the script works perfectly and does exactly what i wanted!!
||Posted - 05/16/2012 : 4:10:28 PM
Here is a basic script to import user-selected files into new workbooks:
// Prompt for files
dlgfile group:=ASCII multi:=1 init:=%Y; // %Y is your UFF
// Loop over all the files
// Get the next file
file$ = fname.GetToken(ii,CRLF)$;
// If we are not done, add a new book
if(ii < fname.GetNumTokens(CRLF)) newbook;
There are many places script can be stored and run in Origin, but the two most common would be in a menu or a toolbar. For example, you can use the Custom Menu Organizer found under the Tools menu to add new menus with custom script.