[jawsscripts] Re: JAWS FindColors Function in IE 10

  • From: "John P. Thomas" <johnt@xxxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Wed, 22 May 2013 15:37:31 -0400

Hi Tom,

I think I did that by activating the JAWSCursor in the script before using the 
FindColors function. Are there other ways to turn off the virtual cursor? 

Thanks,
John

-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx 
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Bissett, Tom
Sent: Wednesday, May 22, 2013 12:11 PM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: JAWS FindColors Function in IE 10 

Have you tried turning off the virtual cursor before running the script.  This 
may clear up at least that issue.
Tom Bisset
-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx 
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of John P. Thomas
Sent: May 22, 2013 12:06 PM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: JAWS FindColors Function in IE 10 Hi Paul,

Thank you for the scripts. They are instructive. The first one correctly sets 
the color variable. The second one fails to find the color for me. The problem 
seems to be that the JAWSCursor gets stuck in the area of the menu bar of IE10. 
Once it gets stuck there I can’t move it unless I AltTab away to another 
application and then AltTab back again. I have tried the RouteJAWSToPC function 
and the MoveToWindow functions without success. I have written some test 
scripts to monitor the window handles and cursor location of the PC and the 
JAWS cursor as the script runs, and I find that the JAWSCursor probably gets 
stuck as soon as the Find Color Function is run, so that it never has the 
chance to search for the color. The JAWSCursor is getting stuck on the menu 
bar, which has a different window handle than the one where the PCCursor is 
located. If I turn off all IE10 tool bars and maximize the window, then the 
JAWSCursor still gets trapped in the same location where the tool bar
  would have been located if it was visible, however, the window handle is then 
the same as the original window handle that was used at the beginning of the 
color search.

I have also tried your script and my test script on other IE10 webpages. The 
JAWSCursor doesn’t seem to get stuck on all of them, but the Find Colors 
function is also not successful. I am not able to get the RouteJAWSToPC 
function to work successfully on any IE10 webpages. Maybe this is normal since 
the virtual cursor is being used and maybe one really can’t route the 
JAWSCursor.

I also noticed that if I use the SayColor script key INSERT+5 with the 
JAWSCursor, it always says black on black regardless of the text it is pointing 
to. It only identifies the color when the PCCursor is active. Since the 
FindColors function uses the JAWS cursor to do the search, then maybe this is 
why the FindColors functions fails for me.

Do you or any of the other scripters have other thoughts about this? Is there 
any way to regain control over the JAWSCursor after it gets stuck? 

Thanks for your help! I have learned quite a bit from your examples.

John



-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx 
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Paul Magill
Sent: Saturday, May 18, 2013 6:54 AM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: JAWS FindColors Function in IE 10 

Hi John and all,

The below script, FindAndReadColoredText,  successfully finds colored text 
using Jaws 13, under Windows XP with I E 8.

** Note 1, it only works when using the Jaws cursor, and when the target text 
is visually on the screen.
Note 2, It failed when the last parameter of FindColors was set to 1, as in 
your first find example.  I dont know why that should be, as the last parameter 
only specifies the extent of the window to search, & as far as I know, the I E 
window is all one window.

The first script, is used to set the global to the text color to find.

I hope this is of some help.

Regards,
Paul from Australia.


Script SetColorToFind ()
; obtains the color to find

VAR

INT Dummy,

STRING ApproxColorName



LET G_TextColor = GetColorText () ; gets the color of the forground text at the 
location of the active cursor

LET ApproxColorName = GetColorName (GetColorApproximation (G_TextColor,
Dummy))



SayUsingVoice (VCTX_Message, ApproxColorName + ", saved as search color",
OT_No_Disable)

; SayInteger (G_TextColor)

EndScript

 

 

Script FindAndReadColoredText ()

VAR

INT Dummy,

STRING ApproxColorName



LET ApproxColorName = GetColorName (GetColorApproximation (G_TextColor,
Dummy))

JAWSCursor ()

IF FindColors (G_TextColor, IgnoreColor , S_Top, 0) THEN

Say (GetColorField (), OT_No_Disable) ; says the colored text

ELSE ; no text of that color found

SayUsingVoice (VCTX_Message, ApproxColorName + " text not found",
OT_No_Disable)

ENDIF ; search for color successful or not

EndScript

 

----- Original Message -----
From: "John P. Thomas" <johnt@xxxxxxxxxxxx>

> Hi scripters,
>
> I tried to get the FindColors function to work in an Internet Explorer 
> window about 5 years ago, and gave up, because I couldn't get it to 
> work for me. I found some other solutions to my scripting tasks and 
> just assumed the function was broken. So here I am again looking at 
> the same function once again, because my employer is about to release 
> a new internet based administration website for customer service 
> staff. At the moment, it looks like the  GetColors function would be 
> the easiest method for gaining access, but well I still can't get it 
> to work for me. Here is my code. Any suggestions? I am using JAWS 13, with 
> Windows 7, and IE10.
>
>
> ;This first test works properly. It verified that the background color 
> is white.
> If GetColorBackground () == RGBStringToColor ("255255255") Then 
> SayString ("white back ground") Else SayString ("not white") EndIf
>
> ;This second test works properly. it verified the color of the text at 
> the cursor to be red.
> If GetColorText () == RGBStringToColor ("255000000") Then SayString 
> ("red text") Else SayString ("not red") EndIf
>
> ; This next function does not work.  It should find red text on a 
> white background and then place the JAWS cursor at the location of the 
> desired color.
> FindColors (RGBStringToColor ("255000000"), RGBStringToColor 
> ("255255255"), s_top,1)
>
> ;This final test searches for the combination of red on white with a 
> test to verify if it was found. It always fails even if the cursor is 
> on the desired color.
> ; I eliminated the background color from the search to simplify it.
> if FindColors (RGBStringToColor ("255000000"), IgnoreColor, s_next, 0) 
> == true Then SayString ("found the color") Else SayString ("color not
> found") JAWSCursor () SayLine () ;reads the line where the JAWS cursor 
> was placed.
> PCCursor ()
> EndIf
>
> Thanks,
> John

__________ 

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

__________ 

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

__________ 

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

__________�

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

Other related posts: