Thursday 24 January 2013

Controlling Mouse event using Matlab code


import java.awt.Robot;
import java.awt.event.*;

cursor = Robot;

cursor.mousePress(InputEvent.BUTTON3_MASK);
cursor.mouseRelease(InputEvent.BUTTON3_MASK);

%%%%%%%%%%%%%   Note %%%%%%%%%%%

BUTTON1 for left click
BUTTON2 for both
BUTTON3 for right click



1 comment:

  1. Thanks for sharing the above ! I love it. I love it so much, that the greedy visual-data gnome in me wants more !

    ReplyDelete