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
 Text output, getn position
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

CStorey

Canada
137 Posts

Posted - 03/15/2001 :  3:03:37 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
A few quick questions. (I found no documentation either to suggest it could or couldn't be done.)

1) What is the fastest way to create a TXT file with Origin? Right now I am using type statements redirected to a NOTES window and then saving as a separate text file. It seems a bit slow for large files. Can I write directly to a file? Something like an fprintf?

2) Is there a way to position a getnumber dialog within the Origin workspace?

3)Is it possible to copy lines from an existing Notes window to a string?

Thanks,
Craig Storey



Edited by - CStorey on 03/15/2001 17:53:23

Laurie

USA
404 Posts

Posted - 03/16/2001 :  11:03:39 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Craig,

If you have OriginPro, you can use the file object to create a TXT file. Look under FUM in the index for the complete documentation.

The FUM provides script access for reading and writing any file. You would have to save your Notes Window as a text file and then you could read in parts of it and store the strings in a string variable.

Currently you cannot position a getnumber dialog within the workspace; however, our development group would like to add this feature. How would you like it positioned? On top and the center of active window, for example?

Please let us know.

Thank you,
Laurie


OriginLab Technical Support
Go to Top of Page

CStorey

Canada
137 Posts

Posted - 03/16/2001 :  2:01:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Laurie,

Thanks for the response. As far as positioning goes I would like full control of the position with the Origin window. Maybe a function to position any message like:

MsgPos({x,y,@CENTER}) - where x, y are the co-ordinates for the upper left corner and @CENTER replacing what exists now. It would be nice to position them within other windows as well - maybe ObjectName.(x,y,@CENTER) to specify where in a given window.

Craig

Go to Top of Page

CStorey

Canada
137 Posts

Posted - 03/16/2001 :  3:32:09 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Laurie,

Even though I have Origin Pro, the help file for LabTalk SR2 does not include FUM. I do have a 6.0 manual as reference, but have there been changes and is there an updated Origin Pro LabTalk SR2 Help file that includes FUM documentation?

I've noticed the following commands do not work (Win98SE):

hFile=file.Open(valid name);

%Q="some comment";
file.Lwrite( "some comment" , hFile);
file.Twrite( "some comment" , hFile);
or
file.Lwrite("%Q" , hFile);
file.Twrite("%Q" , hFile);

But this does
file.Lwrite(Q , hFile);
file.Twrite(Q , hFile);

It seems that specifying the file does not work with strings in quotes. The documentation suggests it should work.

Is there a limit as to how many files may be open at once?

My problem is that I would like to write to two files simultaneously using the above statements. It appears that I have either pass everything to string variables first or open and close the files before I write to them. This causes some problems for large strings where it's not possible to re-use %Z for both files. Please enlighten me.

Thanks,
Craig

Edited by - CStorey on 03/18/2001 11:43:28
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