Thread Subject: Mouse coordinate movement

Subject: Mouse coordinate movement

From: Avinash

Date: 24 Feb, 2008 12:13:05

Message: 1 of 6

Is there any way i can obtain the current mouse coordinate
using matlab?i've found out the way to position my pointer
anywhere on the desktop but how to obtain the current
position of the pointer?

Subject: Mouse coordinate movement

From: Bruno Luong

Date: 24 Feb, 2008 12:47:06

Message: 2 of 6

"Avinash " <avinash368@mathworks.com> wrote in message
<fprn0h$kgo$1@fred.mathworks.com>...
> Is there any way i can obtain the current mouse coordinate
> using matlab?i've found out the way to position my pointer
> anywhere on the desktop but how to obtain the current
> position of the pointer?

get(0,'PointerLocation')

Bruno

Subject: Mouse coordinate movement

From: Avinash

Date: 24 Feb, 2008 17:41:05

Message: 3 of 6

"Bruno Luong" <b.luong@fogale.fr> wrote in message
<fprp09$d77$1@fred.mathworks.com>...
> "Avinash " <avinash368@mathworks.com> wrote in message
> <fprn0h$kgo$1@fred.mathworks.com>...
> > Is there any way i can obtain the current mouse coordinate
> > using matlab?i've found out the way to position my pointer
> > anywhere on the desktop but how to obtain the current
> > position of the pointer?
>
> get(0,'PointerLocation')
>
> Bruno
Thanks a ton!!a valuable info.Needed one more information.Is
it possible to implement mouse events like clicks,scroll
using MATLAB programs and implement it in my SIMULINK model
Or do i have to write C codes and then implemenmt in my
SIMULINK model.Pls help.

Subject: Mouse coordinate movement

From: Bruno Luong

Date: 24 Feb, 2008 17:57:05

Message: 4 of 6

"Avinash " <avinash368@mathworks.com> wrote in message
<fpsa7h$o5d$1@fred.mathworks.com>...
> Is
> it possible to implement mouse events like clicks,scroll
> using MATLAB programs and implement it in my SIMULINK model
> Or do i have to write C codes and then implemenmt in my
> SIMULINK model.Pls help.

When you create a figure (with GUI or not), the following
Callback functions are available to capture mouse actions:

WindowButtonDownFcn
WindowButtonMotionFcn
WindowButtonUpFcn
WindowScrollWheelFcn

Bruno

Subject: Mouse coordinate movement

From: Avinash

Date: 25 Feb, 2008 04:43:05

Message: 5 of 6

"Bruno Luong" <b.luong@fogale.fr> wrote in message
<fpsb5h$28o$1@fred.mathworks.com>...
> "Avinash " <avinash368@mathworks.com> wrote in message
> <fpsa7h$o5d$1@fred.mathworks.com>...
> > Is
> > it possible to implement mouse events like clicks,scroll
> > using MATLAB programs and implement it in my SIMULINK model
> > Or do i have to write C codes and then implemenmt in my
> > SIMULINK model.Pls help.
>
> When you create a figure (with GUI or not), the following
> Callback functions are available to capture mouse actions:
>
> WindowButtonDownFcn
> WindowButtonMotionFcn
> WindowButtonUpFcn
> WindowScrollWheelFcn
>
> Bruno
thanks for the information.But I'm looking for
implementation of mouse events without needing to draw
figures or any additional windows.I simply want to navigate
my desktop and operate the mouse normally but by using a
MATLAB codes only.For example if i ant to click an icon then
i should be able to click on it only by the MATLAB code that
i write to program my mouse.

Subject: Mouse coordinate movement

From: Dan Haeg

Date: 26 Feb, 2008 00:22:02

Message: 6 of 6


> thanks for the information.But I'm looking for
> implementation of mouse events without needing to draw
> figures or any additional windows.I simply want to navigate
> my desktop and operate the mouse normally but by using a
> MATLAB codes only.For example if i ant to click an icon then
> i should be able to click on it only by the MATLAB code that
> i write to program my mouse.

If you are trying to move and click your mouse with matlab
code you can search this site for java robot to find advise
that has already been given.

Dan

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

Tag Activity for This Thread
Tag Applied By Date/Time
java robot Jean Krause 11 Mar, 2008 16:25:11
mouse Avinash 24 Feb, 2008 07:16:20
coordinate Avinash 24 Feb, 2008 07:16:20
current position Avinash 24 Feb, 2008 07:16:20
rssFeed for this Thread

Contact us at files@mathworks.com