フィルターのクリア

How to open/run/control an .exe application using Matlab on windows OS?

16 ビュー (過去 30 日間)
Gopichandh Danala
Gopichandh Danala 2018 年 6 月 22 日
コメント済み: Guillaume 2018 年 6 月 25 日
Hi,
I want to run/ control an external *.exe application using Matlab.
I need to pass some commands on open .exe or control some button clicks on .exe
I used system('*.exe') to open the application.
But, I want to then give commands from Matlab to the application like:
Prompt on the application: Enter Y or N:
In this case, I want to use Matlab and enter Y or N.
Another requirement:
Prompt on application: select a file and click OK?
I want to supply filename like file.txt and click OK using Matlab.
I heard actxcontrol or something like this is used for this but not able to find examples of this specfic needs.
Any help,
Thanks,
Gopi

回答 (1 件)

Guillaume
Guillaume 2018 年 6 月 22 日
actxcontrol is used to embed com (activex) controls into a matlab GUI. These would not come as .exe but as .dll or .ocx.
actxserver to talk to com server. Possibly, your application does have a com interface which you could use to control it but usually such com interface is not designed to interact with the GUI. If the application does not have a com interface, actxserver can't be used.
Your only option left would then be to use the UI automation framework that comes with .Net (which you can call directly from matlab). That will only work if the application uses standard windows control and follows windows design guidelines. Even then, it's going to be a lot of work and requires a fair bit of reverse engineering.
If the application you want to automate is publicly available give us a link so we can see what options are available.
  2 件のコメント
Gopichandh Danala
Gopichandh Danala 2018 年 6 月 22 日
編集済み: Gopichandh Danala 2018 年 6 月 22 日
I found a newer version of app I am using. It can be downloaded by registering here:
The software to download is ROCKIT I attached a sample file to analyse with application.
Now I have many of these text files, I want to use matlab to control these and save outputs at once.
Guillaume
Guillaume 2018 年 6 月 25 日
The page you've linked sort of explain how to talk to the software from matlab. The details are in http://metz-roc.uchicago.edu/MetzROC/software/how-to-call-metz-roc-functions.
This completely bypass the GUI. You would be using loadlibrary to load their dll then use calllib to call whichever function you need after having prepared your inputs/outputs adequately. Exact details to work out yourself from the above documentation. They did have available on demand their own wrapper function to make that easier but as the software is no longer supported, you're out of luck on that front.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeUse COM Objects in MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by