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
 repeat script

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
CHE-TR01 Posted - 03/13/2006 : 2:07:19 PM
Origin Version (Select Help-->About Origin): 7.5
Operating System: XP

I have the following script which carries out various changes to my particular worksheet. I've had a look through the forums and help menus but am still struggling with the following simple questions:

Firstly, how do I carry out the initial sort function on the active worksheet as opposed to having to name it each time?

Secondly, I have imported roughly 200 worksheets on which I want to apply the script. The difficulty I am having is putting in a loop command so that I do not have to carry it out one at a time.

The script is as follows:


sort.wksname$ = test1;
sort.c1 = 0; // all columns
sort.r1 = 1; // from row 1 to
sort.r2 = 1314; // row 1314,
sort.cname1$ = A: A;
// using column A as the primary, sort in ascending order
sort.wks(); // execute sort;

mark -d col(A) -b 1315 -e 1315;
mark -d col(A) -b 2 -e 1169;

del col(B);
del col(E);
del col(F);

worksheet -a 1; // Add 1 columns to the active worksheet

col(B)=ln(col(C)/col(D)); // Take natural log

Any help would be greatly appreciated,

Thanks,

Richard

1   L A T E S T    R E P L I E S    (Newest First)
Laurie Posted - 03/13/2006 : 2:32:34 PM
%H is a system string variable that returns the name of the active window, so you can use that in place of "test1".

The document command can be used to loop through all worksheet windows. You can then put your script inside the doc -e W { } command.

OriginLab Technical Support

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