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
 Notes Windows and LT

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
cdrozdowski111 Posted - 07/22/2013 : 06:44:38 AM
OriginPro 9.0.0 SR2 64-bit, Win7 64-bit, running in VMware Fusion 5.0.3

A couple of questions about manipulating Notes Windows in LabTalk.

1) How do I add (and/or append) a string to the contents of a Notes Window?

2) Can I name a Notes Window with space characters in the name? I tried and it truncates the name at the first space. e.g.:

win -n notes "This is a Notes Window";
2   L A T E S T    R E P L I E S    (Newest First)
cdrozdowski111 Posted - 07/22/2013 : 11:48:38 AM
Thanks for the info.

I decided to create an Origin C function to handle it as it was less complicated.
greg Posted - 07/22/2013 : 09:48:25 AM
Second question first...

You can name a Notes window with space characters in the name, but the old LT command to create a Notes Window does not allow it, so you have to create it, then rename it - and here it gets tricky. (I'll pass along the problem to the programmers.)

// Literal text
win -n notes "This is a Notes Window";
// The resultant name is truncated to "This"
// Here is the rename
win -rn This This is a Notes Window; // No quotes

// String variable
string strNoteName$ = "This is a Notes Window";
win -n notes %(strNoteName$); // Fails by truncation
win -rn This %(strNoteName$);

The trick here is knowing how the name fails (gets truncated to This) since no standard LT convention will tell you its name. A safer method would be to use a standard initial name, then assign its real name:
win -n notes gobbledegook;
win -rn gobbledegook My Notes Window;

Now your first question ...
// Remember output channel(s) of TYPE command
temp = type.redirection;
// Point to correct Notes Window
type.NOTES$="My Notes Window";
// Type output redirected to 'NOTES'
type.redirection = 2;
// Following adds lines to your notes
ty These lines have been%(CRLF)added to the notes window;
// Restore Origin's normal type redirection
type.redirection = temp;

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