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
 Are you a Labtalk?

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
monkeyk Posted - 03/18/2018 : 2:53:28 PM
Origin Ver. and Service Release (Select Help-->About Origin): Origin 2016 pro
Operating System: Win 7 pro

I have some experience with originC and labtalk but I think is something missing in my understanding - how to trigger scripts/code (perhaps with some input parameters) in a way that doesn't require you to remember lots of syntax (and maybe how to make the scripts general enough that you don't have to mess about with them every time).

Example: I often use the GUI to convert a matrix to a worksheet, copying the name across, setting the first row as column labels. I realised that I might as well write a labtalk snippet that does this in one go.

a$=page.name$; m2w -r 2 xy:=ycol xcol:=1 ylabel:=row1 ow:=[a$]; worksheet -s 0 1 0 1; wks.SetAsLabel(L,-1,0,0);

I can paste this onto the command line and it does the trick, but how do I make easy to trigger?
A toolbar button?
A custom menu item?
Should I compile this into an originC function so I only have to type 'mymatrixtoworkbook()', instead of typing "run.section(myfunctions,mymatrixtoworkbook)"?
Should I used the UIM (or whatever) to make my own GUI driven functions?

I am after some general good advice/ideas...How do labtalk/originc ninjas organise their workflow?


J.

i'm teacher
1   L A T E S T    R E P L I E S    (Newest First)
yuki_wu Posted - 03/19/2018 : 01:22:45 AM
Hi J,

The methods you mentioned are all the ways to execute the LabTalk script, you could just choose one of the methods that you feel it is convenience. Besides, there are other methods and you could find here:
https://www.originlab.com/doc/LabTalk/guide/Running-Scripts

Regards,
Yuki
OriginLab

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