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
 Forum for Origin C
 Input from user to dialog box to start program
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Eagleba91

14 Posts

Posted - 07/12/2012 :  11:09:30 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I am trying to make a nice GUI so that a dialog box will pop up upon opening origin asking the user if they want to start a running a program, and if they do have the box pop up again when the program is done running asking if they want to repeat the process.

I'm also trying to figure out how to use the name of a sheet "Sheet1" for example, and name a graph after it.

Penn

China
644 Posts

Posted - 07/12/2012 :  11:50:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Maybe you can refer to the following two pages: On Starting Origin and User Interface.

Penn
Go to Top of Page

Eagleba91

14 Posts

Posted - 07/13/2012 :  11:26:05 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I figured out how to use a GUI to start running my program successfully. I'm having a hard time figuring out how to run my program (plotA) upon startup of origin though. The script walk-through is really vague about what I am supposed to include.

Go to Top of Page

Eagleba91

14 Posts

Posted - 07/13/2012 :  3:12:01 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
for a slightly more direct question: how can I take origin c code and embed it in LabTalk script. If I can do that I can just have everything run when the Custom Routine button is clicked.
Go to Top of Page

Penn

China
644 Posts

Posted - 07/16/2012 :  03:12:14 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

In LabTalk, you can call the Origin C function like a command, here your program (Origin C function) is plotA, right? You can run it as a LabTalk command. In the On Starting Origin, the example is shown how to run LabTalk script when Origin starts. So, you can consider your plotA as LabTalk command to do so.

And there is no the so-called "embed Origin C code in LabTalk script". However, if you want to use an Origin C function, you can compile it before you use it by using the run.loadOC() method. For more details, please refer to this page.

Penn
Go to Top of Page

Eagleba91

14 Posts

Posted - 07/16/2012 :  09:30:23 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Penn,

You are truly a life saver. I wasn't aware that you could simply run a C based program in Labtalk script. Thank you for all of your help!
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