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

2 views (last 30 days)
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?

Accepted Answer

vaya putra
vaya putra on 10 Jul 2019
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 Comments
Walter Roberson
Walter Roberson on 10 Jul 2019
Edited: Walter Roberson on 10 Jul 2019
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 on 10 Jul 2019
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.

Sign in to comment.

More Answers (1)

Walter Roberson
Walter Roberson on 10 Jul 2019
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 Comments
vaya putra
vaya putra on 10 Jul 2019
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 on 10 Jul 2019
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.

Sign in to comment.

Categories

Find more on Simulation in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!