What do you mean by "emulate the scroll wheel", how would you do that (what user input, or is that programmatically?), and why would you want to do that?
Serial ardIn = new Serial(this, Serial.list()[3], 9600);
try {
robot = new Robot();
}
catch (AWTException e) {
e.printStackTrace();
}
}
void loop() {
scroll = ardIn.read() / 50;
robot.mouseWheel(scroll);
//robot.keyPress(KeyEvent.VK_A);
delay(5);
}
No errors, everything seems fine, but it does nothing but pop up a little gray window. I have no way of knowing whether the scroll whel is moving when the window is selected, but if I select another program that responds to the wheel, i.e. web browser, nothing happens. I looked it up and apparently the Robot class doesn't work in the background. To get it to, is there another way, or would I have to use something along the lines of Windows API?
Leave a comment on epicepee's reply
Change topic type
Link this topic
Provide the permalink of a topic that is related to this topic