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
 How to call a '.exe' in OriginC?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

MaggotsBrain

Japan
4 Posts

Posted - 05/22/2014 :  03:40:33 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello,

I would like to automate some data treatment by writing a script with Origin.

My issue is the following: I have a '.exe' program which performs some treatment on my data.
Although it makes some important treatments which are pre-requisite for my following tasks, it does not perform all the treatments I need.
I am not the author of this program and do not want, neither have the skills, to touch it.

Consequently, I would like to know if it is possible to call my '.exe' file throughout a script in Origin to perform some treatments on a specified file. Then, I would be able to pursue the treatment with a classic Origin script.

I am pretty sure it is possible, however, I do not know how to do this, any idea anyone?

cpyang

USA
1406 Posts

Posted - 05/22/2014 :  1:10:52 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You can use the LabTalk run command to run an external EXE, see

http://www.originlab.com/doc/LabTalk/ref/Run-cmd#-e.5Bp.5D.3B_Execute_the_following_text_as_if_it_were_typed_into_the_Windows_Run_dialog_box

Use the run -ep option.

From Origin C, you can execute any LabTalk script. Of if you prefer to really do this from Origin C, then use the WinExec command

http://www.originlab.com/doc/OriginC/ref/WinExec

or ShellExecute

http://www.originlab.com/doc/OriginC/ref/ShellExecute


cp
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