[jawsscripts] p.s. HSCDecodeHotspotColors

  • From: "Geoff Chapman" <gch@xxxxxxxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Wed, 17 Jun 2009 11:59:32 +1000

ok. your second desire though is different than the first.  and it's worth
being aware of this.
the first expressed desire as I understood it, was to have hsc say a certain
phrase to
denote the state of a given area, after, it's primary action, i.e. most
likely, a leftClick to change it's state etc.
Hense it's nomenclature as a "post processing" function.
Now that I read your email more carefully,
what I think you may be wanting now is, stuff related more to
prepositioning/validation  criteria.
i.e. you only want the action of clicking to occur, (your language
being, "want the hotspot to run," upon detection of two differing colors.
if this is the case, I think you need to approach things slightly
differently.

I haven't really got the time today to reexplore all about how this
precisely works, so take everything I suggest from herein with an
unresearched/unverified grain of salt.
I'ts also been ages since i've had my fingers deep into hsc in a big
way, and I must confess I forget how all it's bits work optimally right now.

but, my thoughts are, that if you don't want the click action to be
performed, unless xx or xx colors are present at the individual pixel level
hotspot location, then in the field, color=
you should put your list of legal color RGB strings, without the detection
of which at the given spot,
the hotspot action should not be performed. Don't forget you can copy any
RGB string you find under the active cursor with altShiftNumPad5, to the
clipboard for pasting into spot definitions, with doubleClick of
altShiftNumPad5.
Then, depending on how precise
your positioning of colors
needs to be, in the spot definition,
go down to the parameters,
"searchUpLimit, SearchDownLimit, SearchLeftLimit, and SearchRightLimit,"
and alter their default parameter values of 5, meaning by default if there
is a parameter actually in the color field at all,
hsc would normally feel around in
a 10 pixel square radius for those colors before failing to run the spot's
action if not found,
and alter all there values to 0, which will limit it to just looking in that
one single pixel hotspot location, for the colors specified in the color=
Field.

This should mean that if the colors you specify are not present at that
exact pixel of that spot, that the leftClick action will not be performed.

I presume the hotspot key combo will thus just be trapped and not pass
through to the application in such circumstances, but don't quote me on
that.

now just for your knowledge, of course what you could also alternatively do,
is make the actual
action not a leftClick at all, but set it to value 5, position cursor.
note that with this option as the action though, the jaws cursor becomes the
active cursor after
this action has run, since when it was constructed, it was created because
one often wanted to immediately do some dragging actions or whatever with
the jaws
cursor. So it is left active after this position cursor action, meaning that
in one of your ppost processing functions, (which by the way you can have
multiples of separated by single vertical bar characters,)
you may wanna put a PcCursor call,
to insure pcCursor is active again after the whole thing is done.
so Then, in your "Funciont=",
post processing function line,
you could place either the name of a function which you created yourself in
the jss file,
handling any additional if then conditional logic you liked,
or simply place the two builtIn functions there like this:

Function=LeftMouseButton|HscDecodeHotSpotColor|pause|PcCursor

which of course should not get run, if the colors specified in the color=
field, are not found.

note that in the, Function=
line in spot definitions, for builtin functions with no parameters, for some
reason you don't need to place the empty leftRight parenthisies, like you
legally normally must do in jss land, after each function.

ok  now here's the other caveat you need to be aware of,
when messing with hscDecodeHotSpotColor, also relevant in tracking colors
aspect of HscProcessVerticalSlider, or whatever those are called.
I find I often forget this, and it can get pretty hairy and make you
run round in circles if you do.
and it is this: Sometimes, the colors of pixels at given screen areas,
actually change/alter, depending if the mouse
cursor is hovering over them or not.
And, since my understanding is that the invisible cursor, rather than the
jaws cursor,
is the cursor that hsc internally uses to do the actual color
track/checking,
it is probably the invisible cursor, rhaterh than the jaws cursor, that you
should really use, when first determining the colors that you want to be
present at the given location, for the hotspot to run.

Don't forget Hsc's invisible/jaws cursor routing commands,
AltShiftNumPadPlus, which  activates the invisible cursor and routes it to
location of jaws cursor, and
altShiftNumPadMinus, which activates the jaws cursor and routes it to
location of the invisible  cursor.

of course, to get an accurate reading of what the colors are at that spot
when the mouse is not hovering there,
after navigating to the spot with jaws cursor, then routeing invisible
cursor to that location, you must then activate the jaws cursor again with
plain NumPad minus, and move it away from the location, after which you
would reactivate the invisible cursor again with doubleTap of NumPad Minus,
and reCheck the color at that spot location now, and see if it does alter,
when the mouse isn't hovering over it.

you could of course just forget about using the jaws cursor for navigating
to the spot at all when doing manual color checking validations for spots
like this,
, and just begin with using the invisible cursor, but, you could get
yourself in a bit of a mental spin if your not aware of this fact of colors
actually changing before clicks, just by virtue of the mouse hovering at a
given location.
hth.

geoff c.

From: "GianniP46" <giannip46@xxxxxxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Monday, June 15, 2009 10:41 PM
Subject: [jawsscripts] Re: HSCDecodeHotspotColors


> No, it doesn't auto ask me what phrase I want spoken.  I just typed in all
> of the code manually.
> My second question is that I really want to make sure that the hotspot
only
> runs if there is only two designated colors and nothing else.
> ----- Original Message ----- 
> From: "Geoff Chapman" <gch@xxxxxxxxxxxxxxxx>
> To: <jawsscripts@xxxxxxxxxxxxx>
> Sent: Sunday, June 14, 2009 8:37 PM
> Subject: [jawsscripts] Re: HSCDecodeHotspotColors
>
>
> > yep, so, you just activate the hotspot again, which presumably you've
set
> > to
> > an action of a left mouse click, then it wil click there, presumably if
> > set
> > on the correct pixel,
> > cause a new color to be displayed there, then it should auto ask you,
what
> > phrase would you like spoken when xxx xxx xxx color is found. and it'll
> > keep
> > doing that, whenever you activate the hotspot, whilstever each click
> > action
> > results in it finding a new color there it doesn't have an associated
> > phrase
> > for.
> > is this not what's happening for you?
> > in answer to your secondary question about multiple colors, well, I'm
not
> > sure I understand what your exactly asking/needing here, but the short
> > answer is, yes, the single vertical bar character, single not double
mind
> > you,
> > can be used to separate RGB strings, particularly in the, "color="
field,
> > where color searches are being performed in situations where the spot
> > might
> > move etc, and you wanna search for a particular colored pixel in a given
> > area or direction.
> > However, again, I'm not exactly sure
> > whether this would work in the hscDecodeHotSpotColor fields.
> > I haven't actually tested them that way, rather than leaving them as the
> > definition editor codes them, i.e. one line per color per
> > function/phrase.
> > I guess you could test it and let us all know, if it works with vertical
> > bar
> > separators in those fields, but I can personally see no advantage of
doing
> > that,
> > other than elegance/neatness of code. Am I missing something?
> >
> >
> > geoff c.
> > ----- Original Message ----- 
> > From: "GianniP46" <giannip46@xxxxxxxxxxxxx>
> > To: <jawsscripts@xxxxxxxxxxxxx>
> > Sent: Monday, June 15, 2009 5:30 AM
> > Subject: [jawsscripts] Re: HSCDecodeHotspotColors
> >
> >
> >> yes, I got that far, but now I want hsc to say something else for a
> >> second
> > color
> >>   ----- Original Message ----- 
> >>   From: Geoff Chapman
> >>   To: jawsscripts@xxxxxxxxxxxxx
> >>   Sent: Sunday, June 14, 2009 11:17 AM
> >>   Subject: [jawsscripts] Re: HSCDecodeHotspotColors
> >>
> >>   Hi gian,
> >>   oh man! I've been meaning to answer this queery of yours re color
> >>   identification and reporting differing feedback based on state of
color
> > at a
> >>   particular spot,
> >>   and in fact started an answer to what I know was your second attempt
at
> >>   getting a, "how to," on this,
> >>   1.5 weeks ago but never finished it! I'm soooo sorry about this man.
> > I'll
> >>   try and get to it tomorrow though eh. I wanna go to bed here now, but
I
> >>   think I may have
> >>   something helpful to contribute on this for you, which is a simpler
> > approach
> >>   than the one that I think was suggested by doug or dennis on list
last
> > week,
> >>   though their method might very well be more comprehensive.
> >>   What's your skype User ID? maybe it'd be quicker to talk about it all
> > than
> >>   write it down?
> >>
> >>   but your key to doing this is a post processing hsc function called
> >>   hscDecodeHotSpotColor.  and it should be found under the
> >>   Control+Alt+Shift+f3 menu, after you've assigned your hotspot.
> >>   But, first make sure that your hotspot, is over a pixel which alters
> > color
> >>   to reflect the state of whatever control this is, that your wanting
> > feedback
> >>   on when you click it.
> >>   use the alt+shift+NumPad5 Keystroke, to determine this pixel's color,
> > when
> >>   the button or whatever it is,
> >>   is in a certain state, then manually click the NumPad slash key at
that
> >>   location,
> >>   and then checking again with Alt+Shift+Numpad 5, to check what color
> > that
> >>   pixel now is, in the button's new state etc, so you maybe will get to
> >>   remember what color is associated with what state.
> >>   then when your sure your mouse is over a pixel that will reliably
> > reflect
> >>   this change at your spot, then go ahead and define your spot in the
> > normal
> >>   way using the altControlShiftA wizard.
> >>   then when your done, first insure the mouse hasn't moved from your
> >> spot,
> > and
> >>   then do the post processing assign command, alt+control+shift+f3.
> >>   you should be offered a list of post processing functions to assign
to
> > your
> >>   hotspot.
> >>   choose hscDecodeHotSpotColor, and follow the prompts. i.e. choose the
> > action
> >>   you want to happen when xx color is found, then which should be I
think
> >>   hsdSayPhraseByColor, or something like that.
> >>   then activate the spot with the keystroke you assigned to it, as
> > directed,
> >>   and type in the phrase to be spoken when it clikcs, and finds xx
color
> > there
> >>   etc.
> >>
> >>   I hope this helps.
> >>   ----- Original Message ----- 
> >>   From: "GianniP46" <giannip46@xxxxxxxxxxxxx>
> >>   To: "JawsScriptsList" <JawsScripts@xxxxxxxxxxxxx>
> >>   Sent: Sunday, June 14, 2009 2:47 AM
> >>   Subject: [jawsscripts] HSCDecodeHotspotColors
> >>
> >>
> >>   > OK Folks,
> >>   > I got this function to work after a hotspot, but I want to have two
> > colors
> >>   recognized and a different message for each color spoken.  The help
> >> says
> > to
> >>   put an F after the RGB string.  Does anyone have some examples of
this
> > that
> >>   I can see?  I am not sure exactly what is suppose to happen.
> >>   >
> >>   > Gian Pedulla GianniP46@xxxxxxxxxxxxx
> >>   >
> >>   > LETS! GO! METS!
> >>   > __________
> >>   > Visit and contribute to The JAWS Script Repository
> > http://jawsscripts.com
> >>   >
> >>   > View the list's information and change your settings at
> >>   > //www.freelists.org/list/jawsscripts
> >>   >
> >>
> >>   __________
> >>   Visit and contribute to The JAWS Script Repository
> > http://jawsscripts.com
> >>
> >>   View the list's information and change your settings at
> >>   //www.freelists.org/list/jawsscripts
> >>
> >>
> >>
>
>> -------------------------------------------------------------------------
-
> > ----
> >>
> >>
> >>
> >>   No virus found in this incoming message.
> >>   Checked by AVG - www.avg.com
> >>   Version: 8.5.364 / Virus Database: 270.12.68/2175 - Release Date:
> > 06/14/09 05:53:00
> >>
> >> __________
> >> Visit and contribute to The JAWS Script Repository
http://jawsscripts.com
> >>
> >> View the list's information and change your settings at
> >> //www.freelists.org/list/jawsscripts
> >>
> >
> > __________
> > Visit and contribute to The JAWS Script Repository
http://jawsscripts.com
> >
> > View the list's information and change your settings at
> > //www.freelists.org/list/jawsscripts
> >
> >
>
> __________
> Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>
> View the list's information and change your settings at
> //www.freelists.org/list/jawsscripts
>

__________ 
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

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

Other related posts:

  • » [jawsscripts] p.s. HSCDecodeHotspotColors - Geoff Chapman