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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Notes Windows and LT
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

cdrozdowski111

USA
247 Posts

Posted - 07/22/2013 :  06:44:38 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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";

greg

USA
1378 Posts

Posted - 07/22/2013 :  09:48:25 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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;
Go to Top of Page

cdrozdowski111

USA
247 Posts

Posted - 07/22/2013 :  11:48:38 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks for the info.

I decided to create an Origin C function to handle it as it was less complicated.
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000