Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Mouse Data without clicking

Subject: Mouse Data without clicking

From: Coney Woodcock

Date: 5 Sep, 2010 09:20:09

Message: 1 of 4

I need something that takes down the coordinates of the mouses position as well as a time interval, without clicking the mouse button. The reason is I am trying to write code to calculate speed of my remote control car, with wireless mouse attached, thus I can't keep clicking.
There can be one initial click to start the data and one to stop it, but the button cannot be held down for obvious reasons
The best I have done so far is to use ginput(), and i figure i can use the pause(n) function to control time, but it needs the mouse. This way i have been doing it is probably not the best.
PLEASE PLEASE PLEASE PLEASE HELP ME!!!


thanks in advance :)

Subject: Mouse Data without clicking

From: Oleg Komarov

Date: 5 Sep, 2010 09:59:04

Message: 2 of 4

"Coney Woodcock" <conor123456789@hotmail.com> wrote in message <i5vnc9$4tv$1@fred.mathworks.com>...
> I need something that takes down the coordinates of the mouses position as well as a time interval, without clicking the mouse button. The reason is I am trying to write code to calculate speed of my remote control car, with wireless mouse attached, thus I can't keep clicking.
> There can be one initial click to start the data and one to stop it, but the button cannot be held down for obvious reasons
> The best I have done so far is to use ginput(), and i figure i can use the pause(n) function to control time, but it needs the mouse. This way i have been doing it is probably not the best.
> PLEASE PLEASE PLEASE PLEASE HELP ME!!!
>
>
> thanks in advance :)

Look for "robot java" in the NG or give a llok at this submission:
http://www.mathworks.com/matlabcentral/fileexchange/27632

Oleg

Subject: Mouse Data without clicking

From: Coney Woodcock

Date: 5 Sep, 2010 10:14:06

Message: 3 of 4

Thanks Oleg, it looks promising, but unfortunately I am terrible with matlab and don't understand much more then the very basics. Could you give me a short explanation of how to use this function? It would be much appreciated

Subject: Mouse Data without clicking

From: Walter Roberson

Date: 5 Sep, 2010 16:55:59

Message: 4 of 4

On 05/09/10 4:20 AM, Coney Woodcock wrote:
> I need something that takes down the coordinates of the mouses position
> as well as a time interval, without clicking the mouse button.

See the documentation for the figure properties CurrentPoint and
WindowButtonMotionFcn

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us