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
 How to get a value from text label?

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
aspirant Posted - 06/06/2002 : 11:52:09 AM
I have a label placed on a worksheet. How to get a value of this label to use it as a variable in a Labtalk script?

P.S.: By the way, if open a worksheet and try execute:

page -label

in Labtalk script window Origin7.0(SP1) crashes as well as Origin6.0 (Win2000).
3   L A T E S T    R E P L I E S    (Newest First)
aspirant Posted - 06/06/2002 : 5:36:36 PM
%A=text.text$;
works just fine, thanks.

page -label is of course wrong to use for worksheet but it is a little disappointed to loose unsaved work, must be some sort of protection at least. I expected to see #Command Error!
CStorey Posted - 06/06/2002 : 5:00:58 PM
Page -label???

There's a page -l templateName command that:

Reads the specified template file and add all of its layers to the page in the active graph window.
I think you just used this command inappropriately to cause a crash. But maybe there should be some protection against this.


Craig Storey
Origin WebRing Member - http://g.webring.com/hub?ring=originwebring
Mike Buess Posted - 06/06/2002 : 2:52:32 PM
If you placed the text label on the worksheet with the Add Text command on the right-click menu you should be able to get its contents with

%A=text.text$;

In any case you can select the text label and then use Label Control on the Format menu to find out it's name and/or change it. Then use

%A=labelname.text$; // put its contents in the string variable A
labelname.text$=%A; // set its contents to the contents of %A

...What is page -label? Are you sure you are using the right command?

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 06/06/2002 14:54:12

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