Sending strings/promts to CMD which open an .exe
2 次查看(过去 30 天)
显示 更早的评论
Tyring to send input to a cmd opened software:
They are just strings but if i ad another dos/system command it just starts a new cmd window. also adding & to each doesent work, i want so send the promts
dos('cd C:\Users\...\folder\ & build.exe')
system('cd C:\Users\...\folder\ & build.exe')
Bold are the strings i want so send but ist doesnt work it just stays till the underlined.
Perple_X version 6.9.1, source updated April 20, 2022.
NO is the default (blank) answer to all Y/N prompts
Enter a name for this project (the name will be used as the
root for all output file names) [default = my_project]:
NAME
The problem definition file will be named: NAME.dat
Enter thermodynamic data file name [default = hp02ver.dat]:
hp03ver.dat
2 个评论
采纳的回答
Image Analyst
2022-5-30
Try something like this:
% Prepare a command string for notepad to open the file.
commandString = sprintf('notepad "%s"', fullFileName);
% Call notepad as a separate process where the user can edit the file.
system(commandString);
4 个评论
Image Analyst
2022-5-30
If you are using the window maximized so the widgets are in the same location all the time, then positioning the mouse may work.
There is a keypress option for java robot:
>> methods(mouse)
Methods for class java.awt.Robot:
Robot getClass keyRelease notify wait
createScreenCapture getPixelColor mouseMove notifyAll waitForIdle
delay hashCode mousePress setAutoDelay
equals isAutoWaitForIdle mouseRelease setAutoWaitForIdle
getAutoDelay keyPress mouseWheel toString
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!