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
 Origin Forum
 Please help me with the 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
LifeDeath Posted - 12/05/2020 : 07:32:46 AM
I open several dat files at a time each containing three columns of data.
In this picture you can see what I mean:
https://ibb.co/CBJBrRF
So I automatically open three columns (from one file) and after each one is open I can use some script as you can see in this picture:
https://ibb.co/vhvQ6s2
But on my previous picture you could see that I need absolute values of some columns, so I use the function abs(Col(Name)), and some columns should be X columns. I do it all manually, but can I script it?
I've tried to look for commands and functions that I need but found nothing useful. Now I will describe figuratively the three step process that I want to script:
After the data of three columns is added to a worksheet, I want to use this script (this is an abstract C-like script):


int N = LastColunmNumber;   //   I get the index of the last column at the current step
Make_X(Column(N - 2));   //   the first column of the current iteration is now an X column
Column(N - 1).function = "abs(Col( Column(N - 1).name ))";   //   Take absolute values of the penultimate column as its function
Column(N).function = "abs(Col( Column(N).name) )";   //   Take absolute values of the last column as its function



And then the next file opens automatically and the script repeats, but now the N will be different. Sometimes I need to open dozens and even hundreds of files, so this script could really help. Can you please help me? And as a little bonus, maybe you know what I should add to that after-cycle script to make vertical bold lines after each three separate columns of data (as in the first picture).
I will really appreciate your help.
2   L A T E S T    R E P L I E S    (Newest First)
LifeDeath Posted - 12/06/2020 : 03:26:10 AM
quote:
Originally posted by cpyang

I replied on the LabTalk forum.

https://my.originlab.com/forum/topic.asp?TOPIC_ID=46505

CP



Thanks a lot! I've had some issued so I replied in that other topic.
cpyang Posted - 12/05/2020 : 2:28:40 PM
I replied on the LabTalk forum.

https://my.originlab.com/forum/topic.asp?TOPIC_ID=46505

CP

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