필터 지우기
필터 지우기

Is there a way to control the action of an external program through MATLAB?

조회 수: 3 (최근 30일)
Aman Kalia
Aman Kalia 2016년 5월 19일
답변: Todd Leonhardt 2016년 5월 19일
I am using a co - simulation software by TLK - Thermo for my MATLAB simulations. One of the problem that prevents me from running batches of simulation presently is that once the two models are compiled I have to be physically present to click a button to initiate SYNC in the TLK - Thermo Simulation Server interface. This same button is also activated by a key combination of "Alt + 3". I was wondering if there is a way to write a small code/script that can do the same thing when both the models are ready to by SYNCED thus allowing me to run a batch simulation in one go.
If anyone knows a way to control an external program action through MATLAB with some example it would be really helpful. Thanks in advance.

답변 (2개)

Steven Lord
Steven Lord 2016년 5월 19일
On Windows, see if the external program has a COM interface.
On other platforms, or if the external program does not offer a COM interface, you could try using the Java Robot interface. Locating the button you want to press could be tricky; you might be able to work around this by clicking on the button manually the first time and storing the location of that click, then reusing that location in subsequent runs.

Todd Leonhardt
Todd Leonhardt 2016년 5월 19일
You can use Java to automate GUI interaction. See this article for more information on that: http://undocumentedmatlab.com/blog/gui-automation-robot/

카테고리

Help CenterFile Exchange에서 Gas Models에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by