From: Paul on 9 Jun 2010 16:49 I have a script that asks for user input via a call to the "input" function. I would like to to programmatically supply this input when the script is called. While it would be simple to modify the script, I would like to avoid changing because it is a third party script that frequently changes. The way it is used does not change. Any ideas?
From: Walter Roberson on 9 Jun 2010 16:55 Paul wrote: > I have a script that asks for user input via a call to the "input" > function. I would like to to programmatically supply this input when > the script is called. Java "robot" class should handle that.
From: Paul on 9 Jun 2010 17:05 Walter Roberson <roberson(a)hushmail.com> wrote in message <huov77$ijj$2(a)canopus.cc.umanitoba.ca>... > Paul wrote: > > I have a script that asks for user input via a call to the "input" > > function. I would like to to programmatically supply this input when > > the script is called. > > Java "robot" class should handle that. I expect you're right, but I was hoping for a "pure Matlab" solution.
From: Walter Roberson on 9 Jun 2010 17:10 Paul wrote: > Walter Roberson <roberson(a)hushmail.com> wrote in message > <huov77$ijj$2(a)canopus.cc.umanitoba.ca>... >> Paul wrote: >> > I have a script that asks for user input via a call to the "input" > >> function. I would like to to programmatically supply this input when >> > the script is called. >> >> Java "robot" class should handle that. > > I expect you're right, but I was hoping for a "pure Matlab" solution. Is *all* of the input pre-determined? If so, then you could run matlab itself in -nodisplay mode with input redirected from a file matlab -nodisplay -r "StartMe; quit" < InputFileName
From: Steven Lord on 10 Jun 2010 00:11
"Paul " <pgottschalk(a)pixel-velocity.com> wrote in message news:huouol$67f$1(a)fred.mathworks.com... >I have a script that asks for user input via a call to the "input" >function. I would like to to programmatically supply this input when the >script is called. While it would be simple to modify the script, I would >like to avoid changing because it is a third party script that frequently >changes. The way it is used does not change. > > Any ideas? Write an "interface" function that calls INPUT, gets the data, and calls the main workhorse function. That way you can either call the INPUT-based interface or the main workhorse function directly depending on whether you want interactive input or not. -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ To contact Technical Support use the Contact Us link on http://www.mathworks.com |