Matlab GUI Automation?

后端 未结 2 1573
死守一世寂寞
死守一世寂寞 2021-01-20 07:20

Lets say someone made a Matlab GUI using GUIDE. Now I want to use that code in a programmatic environment - that is no human-in-the-loop. What\'s the easiest way for me to \

2条回答
  •  南方客
    南方客 (楼主)
    2021-01-20 07:52

    MTALAB GUI is Java GUI. For the GUI automation there is a recent post on the blog of Yair Altman: http://undocumentedmatlab.com/blog/gui-automation-robot/

    Following applies only if you can rewrite the application.

    There is usually no need for any form of GUI automation for such tasks as yours. Application should have following architecture: Model->Business Logic->GUI. Each layer is decoupled from layers above it - Model knows nothing about Business Logic which knows nothing about the GUI. It is then possible to call Business Logic programmatically without even displaying the GUI. Here is an example for MVC implementation in MATLAB.

    For this reason GUIDE should be avoided. There is an undocumented layout manager in MATLAB, there are also some on the file exchange.

    In your case you could put the whole Business Logic outside the GUI Logic making GUIDE callbacks do nothing but call your Business Logic functions.

提交回复
热议问题