Automatically entering inputs into executable code at prompt
이전 댓글 표시
I have an old executable code, say run.exe, which asks for user inputs. I would like to create a script which automatically runs the executable and enters the user inputs. I have figured out how to run the code, but I am not sure how to enter the inputs at the prompt in an automated fashion.
execute = '!run.exe'
eval(execute) % This runs the executable
% Executable returns:
Enter input value a:
I do not have access to the coding for the executable, and I have not seen it, so I do not know how to recreate it. Is it possible to have automatic entries for this type of situation?
답변 (1개)
Bob Thompson
2018년 2월 13일
댓글 수: 1
Chien-Han Su
2020년 8월 22일
This works for me (on MATLAB 2020a under Ubuntu 20.04 LTS)! Thank you!
카테고리
도움말 센터 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!