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?
"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?
"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.
"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:
"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.
> 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.
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.