[jawsscripts] Re: Script for getting color at mouse pointer location?

  • From: "Jim Bauer" <holdsworthfan@xxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Tue, 31 Jan 2012 18:01:05 -0600

That integer is simply the RGB color values packed into a long. You can write
your own RGBStringToColor() function with something like:

int function RGBStringToColor(string rgb)
var int red, int green, int blue
let red = stringToInt(stringLeft(rgb, 3))
let green = stringToInt(subString(rgb, 4, 3))
let blue = stringToInt(stringRight(rgb, 3))
return makeLong((green << 8) + red, blue)
endFunction


-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx [mailto:jawsscripts-bounce@xxxxxxxxxxxxx]
On Behalf Of John Martyn
Sent: Sunday, January 29, 2012 9:30 PM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: Script for getting color at mouse pointer location?

I just always used GetColorAtPoint. Why the RGB?I use it in RhapsodyBlind.
Does that integer value ever change its internal meaning?
I do know that Get color at point becomes very unreliable once you start to
include background and foreground colors at least in iTunes where the column
headers were concerned.
John

-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Jim Snowbarger
Sent: Sunday, January 29, 2012 6:19 PM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: Script for getting color at mouse pointer
location?

ooh,  good point.  forgot about that.

----- Original Message -----
From: "Doug Lee" <doug.lee@xxxxxxxxxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Sunday, January 29, 2012 11:33 AM
Subject: [jawsscripts] Re: Script for getting color at mouse pointer
location?


You want foreground and background color. You get those with
getColorText() and getColorBackground(). GetColorAtPoint() returns the color
at a specific point, which could happen to be on either a foreground or
background part of a character, or not on a character at all.

Those three functions return integers. To get the nine-digit decimal code,
call colorToRGBString on each of the getColorBackground and GetColorText
results.

On Sun, Jan 29, 2012 at 11:57:04AM -0500, Saylien Brown wrote:
Jackie, the function GetColorAtPoint retrieves the RGB code, I want the 6
digit color code. Also can you give an example script for me to model my
script after? Thanks.

At 11:33 AM 1/29/2012, you wrote:
>The function u want is GetColorAtPoint(int x, int y) where x & y are 
>the row & column coordinates. GetCursorCol() & GetCursorRow() can be 
>used to obtain the current coordinates.
>
>On 1/29/12, Saylien Brown <saybro@xxxxxxxxx> wrote:
> > I'm using the latest build of JAWS 13 under Windows 7 Home Edition.
> >
> > Really hoping someone has created a simple script for getting the 
> > Background and foreground color at the mouse pointer location. I 
> > want it to grab the RGB number(#000000) , not the name (Black.) It 
> > would copy this info to the clipboard, so all I need do is open 
> > notepad and paste the results there to know what the colors are. I'm 
> > going to attach this script to a shortcut key, so I can have quick 
> > access to it whenever I need this info.
> >
> > Thanks for any help.
> >
> > __________???
> >
> > View the list's information and change your settings at 
> > //www.freelists.org/list/jawsscripts
> >
> >
>
>
>--
>Blame the computer--why not? It can't defend itself & occasionally 
>might even be the culprit Jackie McBride Ask Me Computer Questions at: 
>www.pcinquirer.com Jaws Scripting training materials: 
>www.screenreaderscripting.com
>homePage: www.abletec.serverheaven.net
>__________???
>
>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

--
Doug Lee, Senior Accessibility Programmer SSB BART Group -
Accessibility-on-Demand mailto:doug.lee@xxxxxxxxxxxxxxxx
http://www.ssbbartgroup.com "While they were saying among themselves it
cannot be done, it was done." --Helen Keller __________�

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: