Re: Get virtual PC cursor position

  • From: Peter Parente <parente@xxxxxxxxxx>
  • To: jfw@xxxxxxxxxxxxx
  • Date: Sun, 18 Jan 2004 15:21:03 -0500

Thanks for your help. I'm still having some trouble getting it to work.

Here's what I do. I route the JAWS cursor to the PC cursor on the web 
page. The JAWS cursor winds up in the wrong spot though, because the 
browser window scrolls to a new location whenever the JAWS cursor moves. 
The cursor ends up the scroll distance below the current PC cursor position.

I have also tried routing the cursor, calling GetCursorCol and 
GetCursorRow to see if it gives different coordinate. Unfortunately, it 
doesn't, so I can't use a MoveTo after getting the position to put the 
cursor in the right spot.

Things would be simpler if I could just use LeftMouseButton, but that 
isn't what I need for this application. What I need is the correct 
screen coordinates or client coordinates of the PC cursor position, not 
just a link activated. I plan to pass the coords to a COM object that 
I've created in my JAWS script. The external object retrieves the HTML 
element at the given point. I could even forgo using points if I could 
just tell which object the PC cursor is currently over, but the only 
function that comes close is ieGetFocus and that doesn't work with the 
PC cursor. It only gives the index of the element that's last been 
clicked or received the focus with a Tab key press.

Any other suggestions?

Pete

Captain 357 wrote:

>    Pete,
>
>  There are a number of ways you could go about this.  Overall, Using find
>string may be your best bet.  Once you find the "Go to homepage" link using
>the find string function, the mouse pointer (Jaws cursor) will be positioned
>at the beginning of the text string.  From there you can have your script
>click or whatever you want.  You could also write a simple script to route
>Jaws cursor to PC so at any time you are cruising a page, you could activate
>the script to bring the virtual cursor to where you are and have your
>desired actions run.  To just get your cursor position, you could use
>function "say cursor pos."  However, it will be read by pixel position and
>most likely, will not be of any help.  HTH
>
>David
>Captain357@xxxxxxxxxxx
>
>  "For God, who commanded the light to shine out of darkness, hath shined in
>our hearts, to [give] the light of the knowledge of the glory of God in the
>face of Jesus Christ." -- 2 Corinthians 4:6, KJV
>
>----- Original Message ----- 
>From: "Peter Parente" <parente@xxxxxxxxxx>
>To: <jfw@xxxxxxxxxxxxx>
>Sent: Sunday, January 18, 2004 11:07 AM
>Subject: Get virtual PC cursor position
>
>
>Hi,
>
>I am trying to write a JAWS script for Internet Explorer. I need to find
>out where the Virtual PC cursor is located on the current web page in my
>script. For instance, say I press the number pad down arrow a few times
>and stop over a link called "Go to homepage." Then I press another
>keystroke combo that activates my script. In my script, how do I
>determine that the virtual pc cursor is over the "Go to homepage" link?
>What I'd like to do is get the name of the selected link or (if
>possible) its http address.
>
>Any help would be greatly appreciated.
>
>Thanks,
>Pete
>
>--
>To post a message to the list, send it to jfw@xxxxxxxxxxxxx
>To unsubscribe from this mailing list, send a message to
>jfw-request@xxxxxxxxxxxxx with the word unsubscribe in the subject line.
>
>
>--
>To post a message to the list, send it to jfw@xxxxxxxxxxxxx
>To unsubscribe from this mailing list, send a message to 
>jfw-request@xxxxxxxxxxxxx with the word unsubscribe in the subject line.
>
>  
>

--
To post a message to the list, send it to jfw@xxxxxxxxxxxxx
To unsubscribe from this mailing list, send a message to 
jfw-request@xxxxxxxxxxxxx with the word unsubscribe in the subject line.

Other related posts: