MATLAB Matlab: Intefacing with External Program

  • Thread starter Thread starter I_am_learning
  • Start date Start date
  • Tags Tags
    Matlab Program
AI Thread Summary
To interface a chess engine running in a DOS window with MATLAB, the user seeks a method to send commands and receive responses without launching the program anew. The discussion highlights the need for a solution that allows for direct messaging to the running engine, rather than relying on coordinate-based input methods. The user expresses a preference for a more efficient communication method that enables sending commands like 'isready' and capturing responses like 'ready' directly within MATLAB. The initial suggestion points to a MATLAB File Exchange resource that allows text injection into running programs, but the user emphasizes the desire for a more streamlined approach to facilitate ongoing interaction with the chess engine.
I_am_learning
Messages
681
Reaction score
16
I have an external program (A chess engine) that I want to interface with matlab. If I double-click the Engine.exe, it runs in a dos window. I can then type in commands like
'isready' and it responds with string such as 'ready'. I want to send command to it from MATLAB and receive the response in matlab.
Anyone knows how to do it?
I am using Windows.
 
Physics news on Phys.org
Yeah! I won't be passing arguments while starting the program. The program will be running separately (doing its calculations). I just want to communicate with it time to time. Your link shows way to type into any running windows program. Thats fine. But it would be more better if I could directly message the program instead of having to specify the co-ordinate for the input field of the program.
Moreover, I also need to read back the text-answer produced by the program.
 

Similar threads

Replies
9
Views
3K
Replies
2
Views
1K
Replies
3
Views
2K
Replies
5
Views
3K
Replies
1
Views
1K
Replies
4
Views
3K
Replies
4
Views
3K
Replies
18
Views
6K
Back
Top