0

From inside an mxj object, is there any way to determine whether any mouse buttons are currently pressed?

I know that in a Max patch this data can be gathered from a [mousestate] object. I'd like to do the same sort of thing, but from within my Java code.

Any ideas?

dB'
  • 7,838
  • 15
  • 58
  • 101

2 Answers2

0

I used this to get the mouse position.

public void bang() {
        Point p = MouseInfo.getPointerInfo().getLocation();
        post(""+p.getX());
}

Getting the mouse state should be really easy with the help of the code above.

clankill3r
  • 9,146
  • 20
  • 70
  • 126
-1

After many hours of searching, I couldn't figure out any way to get at the mouse state data from within the mxj object. I'm not sure it's possible. I ended up working out a clunky solution using [mousestate] instead.

dB'
  • 7,838
  • 15
  • 58
  • 101