468,553 Members | 1,374 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,553 developers. It's quick & easy.

location of keyboard cursor

Hi

I am trying to find a way to make the mouse cursor move to the keyboard
cursor position in an application. For example, I use an application called
Enterprise Guide, and I control this application using Dragon naturally
speaking as I have a disability that makes using the keyboard quite
difficult.

I often have to say the name of an object to make to be the active or
highlighted object. However to do something such as drag and drop in Dragon
NaturallySpeaking , I need to have the mouse at the same position that I
want to drag from.

I know there are functions such as GetCursorPos - but this appears only to
work in terms of the mouse position. What I would like to do is to find the
coordinates of the current active highlighted object. An example of this
could be, in windows explorer, if your mouse position is on the right-hand
side of your screen, but you have a folder highlighted in the left pane. How
could you move the mouse cursor to the location where the highlighted object
is?

I would appreciate any suggestions, or any links to any sites that may
assist me.

Thank you for your help

Doug
Dec 14 '07 #1
2 2203
If you are looking to get the coordinates of a highlighted object, then I
would suggest declaring two JavaScript variables and assign them the
appropriate values when the onfocus event occurs. To do this without
manually adding the onfocus event handler to all elements, use event
bubbling (sometimes event bubbling can be tricky in JavaScript, but in this
case, it is probably worth it). The only problem that this may present is if
there is an object that cannot have focus (for example, text on webpages
sometimes cannot recieve focus). This is the best suggestion I can give,
hopefully it will help you get closer to what you want.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Doug" <go**********@optusnet.com.auwrote in message
news:47**********************@news.optusnet.com.au ...
Hi

I am trying to find a way to make the mouse cursor move to the keyboard
cursor position in an application. For example, I use an application
called Enterprise Guide, and I control this application using Dragon
naturally speaking as I have a disability that makes using the keyboard
quite difficult.

I often have to say the name of an object to make to be the active or
highlighted object. However to do something such as drag and drop in
Dragon NaturallySpeaking , I need to have the mouse at the same position
that I want to drag from.

I know there are functions such as GetCursorPos - but this appears only to
work in terms of the mouse position. What I would like to do is to find
the coordinates of the current active highlighted object. An example of
this could be, in windows explorer, if your mouse position is on the
right-hand side of your screen, but you have a folder highlighted in the
left pane. How could you move the mouse cursor to the location where the
highlighted object is?

I would appreciate any suggestions, or any links to any sites that may
assist me.

Thank you for your help

Doug

Dec 18 '07 #2
Hi Nathan

Thanks for your suggestion - can you elaborate a little on this?

What is event bubbling?

I write C# and VB but am not too familiar with javascript.

Thanks

Doug
"Nathan Sokalski" <nj********@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
If you are looking to get the coordinates of a highlighted object, then I
would suggest declaring two JavaScript variables and assign them the
appropriate values when the onfocus event occurs. To do this without
manually adding the onfocus event handler to all elements, use event
bubbling (sometimes event bubbling can be tricky in JavaScript, but in
this case, it is probably worth it). The only problem that this may
present is if there is an object that cannot have focus (for example, text
on webpages sometimes cannot recieve focus). This is the best suggestion I
can give, hopefully it will help you get closer to what you want.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Doug" <go**********@optusnet.com.auwrote in message
news:47**********************@news.optusnet.com.au ...
>Hi

I am trying to find a way to make the mouse cursor move to the keyboard
cursor position in an application. For example, I use an application
called Enterprise Guide, and I control this application using Dragon
naturally speaking as I have a disability that makes using the keyboard
quite difficult.

I often have to say the name of an object to make to be the active or
highlighted object. However to do something such as drag and drop in
Dragon NaturallySpeaking , I need to have the mouse at the same position
that I want to drag from.

I know there are functions such as GetCursorPos - but this appears only
to work in terms of the mouse position. What I would like to do is to
find the coordinates of the current active highlighted object. An example
of this could be, in windows explorer, if your mouse position is on the
right-hand side of your screen, but you have a folder highlighted in the
left pane. How could you move the mouse cursor to the location where the
highlighted object is?

I would appreciate any suggestions, or any links to any sites that may
assist me.

Thank you for your help

Doug


Dec 27 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Scott Shaw | last post: by
reply views Thread by Dennis | last post: by
4 posts views Thread by Strahimir Antoljak | last post: by
1 post views Thread by =?Utf-8?B?aG9tYW50Y3c=?= | last post: by
331 posts views Thread by Xah Lee | last post: by
reply views Thread by =?Utf-8?B?SmltSGVhdmV5?= | last post: by
7 posts views Thread by Burden | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.