Buenas tardes,
finalmente, he conseguido resolver el problema creando una aplicacion con processing>
Código:
import java.awt.AWTException;
import java.awt.Robot;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
char key1;
void setup()
{
}
void draw()
{
try {
Robot robot = new Robot();
char e;
if(key1=='º'){
//un salto
robot.keyPress(KeyEvent.VK_ALT);robot.keyPress(KeyEvent.VK_TAB); delay(250); robot.keyRelease(KeyEvent.VK_ALT);//robot.keyPress(KeyEvent.VK_ENTER);//robot.keyPress(KeyEvent.VK_ENTER); delay(100);
Thread.sleep(500);
//posicionando
//copiamos información:
robot.keyPress(KeyEvent.VK_CONTROL);robot.keyPress(KeyEvent.VK_C);
robot.keyPress(KeyEvent.VK_TAB); robot.keyRelease(KeyEvent.VK_TAB);
robot.keyRelease(KeyEvent.VK_C);robot.keyRelease(KeyEvent.VK_CONTROL);
Thread.sleep(200);
//nuevo posicionamiento
robot.keyPress(KeyEvent.VK_ALT);robot.keyPress(KeyEvent.VK_TAB); robot.keyRelease(KeyEvent.VK_TAB);delay(50);robot.keyPress(KeyEvent.VK_TAB); robot.keyRelease(KeyEvent.VK_TAB); robot.keyRelease(KeyEvent.VK_ALT);//robot.keyPress(KeyEvent.VK_ENTER);//robot.keyPress(KeyEvent.VK_ENTER); delay(100);
Thread.sleep(200);//pegamos información:
robot.keyPress(KeyEvent.VK_CONTROL);robot.keyPress(KeyEvent.VK_V);
robot.keyRelease(KeyEvent.VK_V);robot.keyRelease(KeyEvent.VK_CONTROL);
robot.keyPress(KeyEvent.VK_ENTER);robot.keyPress(KeyEvent.VK_ENTER);
Thread.sleep(200); //un salto posicionamiento
robot.keyPress(KeyEvent.VK_ALT);robot.keyPress(KeyEvent.VK_TAB); delay(250); robot.keyRelease(KeyEvent.VK_ALT);//robot.keyPress(KeyEvent.VK_ENTER);//robot.keyPress(KeyEvent.VK_ENTER); delay(100);
Thread.sleep(200);//doble salto para recuperar posicion incicial
robot.keyPress(KeyEvent.VK_ALT);robot.keyPress(KeyEvent.VK_TAB); robot.keyRelease(KeyEvent.VK_TAB);robot.keyPress(KeyEvent.VK_TAB); robot.keyRelease(KeyEvent.VK_TAB); robot.keyRelease(KeyEvent.VK_ALT);//robot.keyPress(KeyEvent.VK_ENTER);//robot.keyPress(KeyEvent.VK_ENTER); delay(100);
}
} catch (Exception e) {
e.printStackTrace();
}
}
void keyTyped()
{
if(key=='º'){key1='º';}
}
salu2s