import java.awt.Robot;
import java.awt.event.KeyEvent;
public class Main {
static boolean check = false;
static boolean boom = true;
public static void main(String[] args) throws Exception{
do{
if(check == true){
Robot r = new Robot();
r.delay(1000);
r.keyPress(KeyEvent.VK_DECIMAL);
r.keyRelease(KeyEvent.VK_DECIMAL);
r.keyPress(KeyEvent.VK_M);
r.keyRelease(KeyEvent.VK_M);
r.keyPress(KeyEvent.VK_E);
r.keyRelease(KeyEvent.VK_E);
r.keyPress(KeyEvent.VK_N);
r.keyRelease(KeyEvent.VK_N);
r.keyPress(KeyEvent.VK_U);
r.keyRelease(KeyEvent.VK_U);
r.keyPress(KeyEvent.VK_ENTER);
r.keyRelease(KeyEvent.VK_ENTER);
}
}while(boom == true);
}
public void keyPressed(KeyEvent e){
int keyCode = e.getKeyCode();
if(keyCode == KeyEvent.VK_F9){
check = true;
boom = true;
}
if(keyCode == KeyEvent.VK_F11){
check = false;
boom = false;
}
}
}
これは私のコードです。F9 を押すと .menu の書き込みが開始され、F11 を押すと停止します。ヘルプはありますか?