running MATLAB on a Linux machine, can use the function like " WScript.Shell" COM interface to send keystrokes to your application

1 次查看(过去 30 天)
i would like do many things to coupling between Matlab and antoher simulation
i am facing that i need to save as data first throught Paraview and got the output as input data to MATLAB
if there any function that can send keystrokes to my application?

采纳的回答

vaya putra
vaya putra 2019-7-10
i tried running using java.awt.robot.event.keyevent.VK_enter
but in another simulation did not happen anything.
i am too struggle how to write CTRL+O to open file
  2 个评论
Walter Roberson
Walter Roberson 2019-7-10
编辑:Walter Roberson 2019-7-10
You need to VK_CONTROL VK_O just like you would type
Remember to send the corresponding release events for each key.
vaya putra
vaya putra 2019-7-10
hi
do you know how to convert value
<FieldData>
<DataArray type="Int8" Name="EGS_VERSION" NumberOfTuples="21" format="binary" RangeMin="45" RangeMax="103"> AQAAAACAAAAVAAAAHQAAAA==eJwz0zPUM9A1NLE00E03T0s1MU9NTEoDADPZBX4=
that value have range between 45-103 but when i run read in matlab looks like encoding data. so i can extract that data.

请先登录,再进行评论。

更多回答(1 个)

Walter Roberson
Walter Roberson 2019-7-10
Java Robot class.
In a more batch environment, there are approaches using pseudo terminal (pty) including possibilities such as using ksh coprocess facilities such as
print -p stuff to send
  2 个评论
vaya putra
vaya putra 2019-7-10
hi i open paraview using this scripts
system('paraview');
robot = java.awt.Robot;
robot.keyPress(java.awt.event.KeyEvent.VK_CONTROL);
robot.keyPress(java.awt.event.KeyEvent.VK_O);
but i am wonder that CTRL+O it command work to openfile in matlab not in PAraview.
do you know how to give command to open new file work on PARAVIEW?
Walter Roberson
Walter Roberson 2019-7-10
You have to send mouse moves to position over the para vision window, presuming you know where it is.
Remember to send the key release events like I mentioned before.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 View and Analyze Simulation Results 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by