フィルターのクリア

system command pressing return

6 ビュー (過去 30 日間)
Thomas Kurian
Thomas Kurian 2020 年 5 月 28 日
コメント済み: Thomas Kurian 2020 年 5 月 29 日
I am trying to run a system command from matlab, but I need to hit enter twice before any output comes out.
If I run it in the command window I can hit enter twice and then I get the output, but I also need to run this from a script as well where I don't want to be press enter. I just want it to continue.
Is there a way to call the system command and specify that I need to hit enter?

採用された回答

Fangjun Jiang
Fangjun Jiang 2020 年 5 月 28 日
This trick has worked many times. Try it.
Create a text file called KeyInput.txt, in which you hit return twice and save it. Basically it is a blank text file. Name it differetnly if you want.
Then run system('MyCommand.exe < KeyInput.txt')
  1 件のコメント
Thomas Kurian
Thomas Kurian 2020 年 5 月 29 日
Fantastic. Worked like a charm!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDesktop についてさらに検索

タグ

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by