Prev: matlab compile with dotnet (old question)
Next: Is there any way to speed this elementwise expression up?
From: Stephane Poirier on 25 Dec 2009 08:04 The code below (matlab code) selects the proper window (in this case a mathworks matlab figure) and then throws a keypress. But the keypress (character A) goes to the matlab command console window. I would like to find a way to send the keypress to the matlab figure (opened graphic window). robot = java.awt.Robot: pos = get(FigureH, 'Position'); set(0, 'PointerLocation', [pos(1:2)]); robot.mousePress(java.awt.event.InputEvent.BUTTON1_MASK); robot.mouseRelease(java.awt.event.InputEvent.BUTTON1_MASK); java.awt.Robot.keyPress(65); Stephane |