TechTalkz.com Logo

Go Back   TechTalkz.com Technology & Computer Troubleshooting Forums > Tech Support Archives > Programing Languages > C#(C Sharp)

Notices

Reply
 
LinkBack Thread Tools Display Modes
Old 15-12-2007, 08:25 AM   #1
Doug
Guest
 
Posts: n/a
get coordinates of current highlighted or active object

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. I am able to write code but I can't find a way to make this
work.

Thank you for your help

Doug


  Reply With Quote
Old 15-12-2007, 08:25 AM   #2
Peter Duniho
Guest
 
Posts: n/a
Re: get coordinates of current highlighted or active object

On Fri, 14 Dec 2007 17:56:26 -0800, Doug <gordononline@optusnet.com.au>
wrote:

> [...]
> 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. I am able to write code but I can't find a way to make this
> work.


It will depend entirely on what is displaying the object in question.

For many things, there will be a window instance associated with the item
(controls are windows too), and you can get the coordinates for the
window. But for many other things, there is no specific window
association with the item, because the item you're looking at is contained
inside a control that does all of its own drawing and user-interface work
without the benefit of sub-controls.

So, you could address this in specific situations, but not in a general
way. IMHO, it would probably be better to work on a way to make it easier
to move the mouse cursor around manually. I'm kind of surprised,
actually, that a speech-input program like Dragon's doesn't already
include a feature like that.

Pete
  Reply With Quote
Old 15-12-2007, 08:26 AM   #3
Doug
Guest
 
Posts: n/a
Re: get coordinates of current highlighted or active object

Hi Peter,

Dragon does have the feature but I am trying to help both myself and other
people with a disability to work more effectively.

The way that Dragon performs this task is to use a command such as
"MouseGrid 4 2 2 1 Button Click". Dragon divides the screen using MouseGrid
into a 3X3 matrix and drills down using the matrix in a matrix concept until
the mouse is pinpointed. This is clunky but it maybe the only way to do
this.

Thanks very much for your response.

Doug
"Peter Duniho" <NpOeStPeAdM@nnowslpianmk.com> wrote in message
newsp.t3ctqfrm8jd0ej@petes-computer.local...
> On Fri, 14 Dec 2007 17:56:26 -0800, Doug <gordononline@optusnet.com.au>
> wrote:
>
>> [...]
>> 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. I am able to write code but I can't find a way to make this
>> work.

>
> It will depend entirely on what is displaying the object in question.
>
> For many things, there will be a window instance associated with the item
> (controls are windows too), and you can get the coordinates for the
> window. But for many other things, there is no specific window
> association with the item, because the item you're looking at is contained
> inside a control that does all of its own drawing and user-interface work
> without the benefit of sub-controls.
>
> So, you could address this in specific situations, but not in a general
> way. IMHO, it would probably be better to work on a way to make it easier
> to move the mouse cursor around manually. I'm kind of surprised,
> actually, that a speech-input program like Dragon's doesn't already
> include a feature like that.
>
> Pete



  Reply With Quote
Reply

Thread Tools
Display Modes


Google
 


All times are GMT +5.5. The time now is 05:15 AM.


vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO
Copyright © 2005-2008, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional