[jawsscripts] Re: Easier way of writing scripts

  • From: "Geoff Chapman" <gch@xxxxxxxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Thu, 17 Nov 2011 14:18:54 +1100

HI.

I was fortunate enough to be in on the ground floor of significant 
testing/development of hsc with Jim Snowbarger, one seriously compitent 
scripter in my view,
back in 2005/2006,
and from my understanding, that was exactly it's purpose!
As Christopher highlights it below.

I had *exactly* the same desires as A W had, and somehow stumbled upon this 
app that Jim had constructed, in it's very early stages. And got sooo 
excited at what I saw were it's possibilities, that I contacted him to see 
if i could inspire further development/extension. and Jim graciously 
responded! ... yeah. it turned into a bit of a monsterously  feature-rich 
incredibly funky tool!

Unfortunately, I kinda moved out of the music industry several years back 
now,
where the applications we wanted to use, were sooo jaws unfriendly, that hsc 
really became an essential tool for being able to access/drive some of the 
pluggins we wanted to use in that environ,
to facilitate locating/clicking in specific areas on the often totally 
graphical, and thus blank to jaws cursor,
 front-ends of these things.

So unfortunately I've been now several years out of the hsc headspace.  so 
am far less useful now as to it's day-to-day operation/state, than I 
would've been back in 2006.
Like most software, my oppinion is that it's got it's learning curve, and 
quirky bits that take a bit of getting one's head around,
But, having now delvved into more scripting language than I knew back in 
2005 when I first started with Jim on this amazing tool, I still think it's 
caveats are simpler to learn to navigate, than the raw scripting language 
itself, for solving the types of problems your wanting to solve Andre.

So, in other words, I'd personally encourage you to dig into this tool, if 
your interested in automation with custom keystrokes within jaws, which it 
sounds like you pretty much are.

It doesn't get talked about up here much, because the real scripter types, 
who know how to use the language, obviously prefer to utilize their 
individual functions/script commands, to specifically meet the requirements 
of each situation, as you heard doug describe.
But, for esssentially non-programmery types, who want a menu driven front 
end first, to then be able to easily tweak the resultant hotspot definition 
as needed afterwards,
and who can still follow basic logic, I fully believe hsc is an incredibly 
useful and much needed mid-ground approach.
And easier, in my view, than getting one's head around gobs of functions in 
order to do very simple tasks, as Andre points out.

You have no doubt already read comparison's with hsc and frame manager, in 
the documentation Andre.
It's worth thus pointing out, that although hsc does significantly, 
significantly more than frames manager ever did, and in my view
has a much easier way of manually editing each line of code that it 
generates than the frames manager definitions,
within the hsc definition editor, reached after instalation, with 
AltControlShiftF4,
The builtin frames manager in jaws itself, can also be made to do some of 
the things your talking about.  particularly if the text of the stuff you 
wanna click on, is already visible to the jaws cursor, and thus the 
FindString type commands, that presumably both frames manager and hsc 
functionality both employ, can be used to locate the stuff you wanna click 
on.

So just to make you aware of that.
And, of course because frames manager does less, it's arguably a bit simpler 
to learn. I started with that myself.
But, it has it's limitations, and I believe hsc is just a fantastic tool for 
the types of customizations your talking about.

I can remember/will tell you that The single most primary caveat, that most 
readily, "breaks," hotspot clicker from successfully/reliably  clicking on 
it's assigned, "spot," is, insufficient understanding/handling, of the part 
of the spot creation wizard which asks the user to remove dynamic 
information from the titleBars of up to, oh goodness, maybe  as many as 4, 
different window types, that it might deem relevant to the spot your 
creating.
I.e. Application window, TopLevel Window, RealWindow, and CurrentWindow.
This is called the, "window validation criteria."
Frames Manager has it as well.


And, although to the uninitiated, it can initialy appear as just an 
irrelevant  pain that one would prefer not to have to deal with,
as it's name suggests, it's actual purpose is, to help insure, that one 
doesn't just perform a, blind, mouseClick, at a given spot, without first 
seeking to validate that the environment that was present when you defined 
the spot, is still sufficiently there, to warrant a fair shot at clicking 
there.
, that the result you initially defined the spot to bring about, at spot 
definition time,
is still gunna be valid, to bring about again,
at spot activation time.
i.e. when you hit your hotkey for the click.
So, it's kinda a good thing, but it doesn't appear like that when you first 
get into hsc.

However, of course, the other side of this spectrum that your juggling 
against, is that if the environment validation criteria, is left too 
strict/tight,
then the least change in any one of the windowNames, which might not at all 
mean that your spot has become inOpperable,
will invalidate the match criteria, and hsc will think it's no longer safe 
to click there, and will prevent you from doing so. bringing a, "Donk," 
sound from your computer, and the dreaded "hotspot failed," message.
and if you leave all your windowNames validation criteria totally unedited, 
as the hotspot wizard first presents them to you, almost certainly your spot 
will fail the very next time you open your app, since many legitimate 
changes can happen in those window names, which may not invalidate your spot 
from doing what it was designed for.

If that makes sense. I'm not very adept at explaining complex concepts and 
making them simple to understand. I apologize for this.

So Now the thing is, it's pretty crucial, to remove anything from each of 
these window types, during the hotspot creation wizard. This is particularly 
relevant for the first spot you define, since it tries to, 
"learn,"/remember, the answers given in the definition of the first spot in 
a given environment, if it finds similar criteria in subsequent hotspots, 
defined in that same environment.
notice I'm using the term, "spots," and, "hotspots," interchangeably here. 
They mean the same thing.

now there's two primary caveats to be aware of in doing this.
one simple one is, that you need to watch that your sometimes quite lengthy 
windowName/title, might extend over two lines, rather than one. so make sure 
you utilize control+Home and control+end, rather than just home and end, 
whilst navigating the windowName your trimming.

The Second slightly more complex problem, is, of course, that you may not 
necessarily really know, what criteria is going to remain constant, and what 
not, in your windowNames, as you are messing around in your application.

Thus making it rather difficult to really know, what to remove, and what to 
leave alone.


So, my basic rule of thumb for newbys at this, is, to remove anything from 
these window names, that you aren't absolutely confident will be there, 
during all the times you want your click to actualy work.
And if your unsure, then delete whatever your unsure of.
e.g. I almost always recommend deleting the entire CurrentWindowName, 
sometimes abbreviated in hsc to just, WindowName, because I've found that 
this can change so readily, that it often provides more headaches than joys, 
to leave anything in there as part of validation criteria.

Secondly, if you are wanting hsc to look for a particular word/phrase  to 
insure greater reliability for your click spot, if such is visible to jaws 
cursor,
then after obviously placing the jaws cursor at the spot you want to define, 
and over one of the words, activate the Graphics/Words hotspot creation 
wizard, using altControlShiftG, rather than the standard AltControlShiftA, 
wizard. This will then take into account the word or graphic name which may 
be under the jaws cursor, and ask you questions about how you'd like hsc to 
treat this.
usually searching from topDown, is best, but there may be situations where 
the spot is near the bottom of a window, that you'd prefer hsc to search 
bottom up, which you can also choose.
Tip: although the wizard may often ask you only about a single word, you can 
define this to be a longer phrase after the fact, by delving into the 
definition for that spot, after completion of the wizard.
You'll find a whole bunch of after-the-fact twekable stuff in there, which 
I'm sure the rather comprehensive documentation will explain in detail for 
you if desired.

oh there's just a million and 1 things I could rave on and on about, in the 
mastering of hsc.  But I think that should do for starters.

I will just conclude though, by saying that integration of hsc into the 
internet explorer environment, is not nearly as simple, as just using it in 
a local application. for which it was initially designed.
for obvious reasons. and this is treated a little in the documentation.
There's a bunch of other things you need to be aware of, when doing spots in 
an app such as internet explorer, given that it can host just sooo many 
webpage environments, all potentially requiring different validaition 
criteria, and maybe a separate hotspot set for each page, which you'd then 
ultimately like it to load automatically when it detected that webpage. rah 
rah rah.
So I'm not going into that one now.

happy clicking.

And perhaps ask your questions one by one, as you delve into hsc more as you 
try things. if you decide it's something you'd like to learn to master.
just don't get too frustrated if things don't work out as you expect 
straight away. like all software really, specially for us, it's a slower 
learning curve to getting the result you want, than you wish it was.  But, I 
can tell you from personal experience, I think hsc is a very very funky 
tool, the stuff it can do, once you learn how to drive it well. and realy 
dig into it.
I believe it can permit blind user access to drive stuff that would be 
almost impossible without it, in some applications.


Geoff Chapman.

----- Original Message ----- 
From: "Christopher Chaltain" <chaltain@xxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Thursday, November 17, 2011 6:31 AM
Subject: [jawsscripts] Re: Easier way of writing scripts


>I wonder if Hot Spot Clicker from http://hotspotclicker.org/ will help
> with Andre's situation. I'm not sure, since I haven't used it myself,
> but it looks like it's purpose is to make clicking on different areas of
> the screen easier and without having to resort to scripting.
>
> On 16/11/11 13:20, Doug Lee wrote:
>> Your frustration is understandable, but the basic problem is that
>> application developers use many different methods of displaying the
>> various parts of their applications, and each method can have
>> different accessibility characteristics.  In short, each type of
>> control in an application can require its own accessibility solution.
>> Freedom Scientific writes solutions to what it considers the most
>> common control types, but they simply can't predict or manage all
>> possible situations that happen out there. Since JAWS is scriptable,
>> others can help out by coding for more situations; but still, more
>> accessibility issues exist than there are capable hands to address
>> them.
>>
>> So in summary, the fact that JAWS can't natively handle all the
>> applications you may use is as lamentable as it is inevitable.
>>
>> On Wed, Nov 16, 2011 at 11:09:41AM -0800, Andre Williams wrote:
>> Yes, I think this is the problem with all this scripting business. Look 
>> at
>> the amount of stuff you listed which one has to learn to get started. If
>> this is your work then this is something that has to be learned, but if 
>> you
>> are coming at this from the perspective of the regular user needing 
>> simple
>> script features not already existing in jaws, then one must now take 
>> hours
>> and hours of personal time to learn this stuff as well as paying for
>> tutorials and stuff. I just want to make jaws quickly click on a tab on 
>> my
>> screen, but it appears I have to learn tons of scripting first. I am not
>> directing my comments at you Jacky, I'm only conveying my frustration 
>> with
>> what seems like a process that should not be this difficult. I already 
>> paid
>> lots for jaws so I don't plan on continuing to sink more money into it.
>>
>> Just so I have a better perspective of the investment of time, what will 
>> go
>> into writing a script that will make jaws click on a specific tab with a
>> press of a hotkey? I've already studied the layout of the screen a bit 
>> and
>> found that the tabs don't move, nor do the other items I want to access 
>> with
>> hotkeys. Can this type of script be written easily, or do I have to learn
>> all the things Jacky suggested?
>>
>> A-W
>>
>> ----- Original Message ----- 
>> From: "Jackie McBride" <abletec@xxxxxxxxx>
>> To: <jawsscripts@xxxxxxxxxxxxx>
>> Sent: Wednesday, November 16, 2011 10:49 AM
>> Subject: [jawsscripts] Re: Easier way of writing scripts
>>
>>
>> Andre, there are many ways, depending on the app. Moving to a window
>> handle or control ID, doing a findstring(), Looking for a particular
>> window class & control ID combination, going thru the window or object
>> hierarchy--those are just a few for starters. I can't really be more
>> definitive because, as I said, it really depends on the application &
>> how it's structured.
>>
>> I'd recommend u study the basics of scripting manual included in the
>> Jaws help topics, as well as some of the jaws scripts which are
>> located in the settings/enu directory of your jaws folder. My
>> scripting 101 materials are also available for purchase at:
>> www.screenreaderscripting.com
>> if u feel the other materials aren't sufficient to meet your needs.
>>
>> On 11/16/11, Andre Williams <andre.williams.1965@xxxxxxxxx> wrote:
>>> HI all,
>>>
>>> Does anyone know of a more elegant manner of writing a script than
>>> specifying every command? I'm looking to refine the accessibility of
>>> WordWeb
>>> a bit more and would like to not have to use script text such as
>>> page up
>>> page up
>>> home
>>> next word
>>> next word
>>> say word
>>>
>>> Is it possible to somehow take the jaws cursor to a specific icon or 
>>> point
>>> on the screen then hit a hotkey to tell Jaws that this is the object I
>>> want
>>> to use in my script?
>>>
>>> For example, WordWeb has several tabs. One of these tabs is used to read
>>> the
>>> Wikipedia article for the word one is wanting to define. I would like to
>>> use
>>> the jaws scripting functions or keyboard commands to write a script that
>>> makes jaws jump directly to this desired Wikipedia tab object without 
>>> all
>>> the PageUp (), Home (), NextWord () commands.
>>>
>>> If this is possible, please help a brotha out and let me know how this 
>>> can
>>> be done.
>>>
>>> A-W
>>>
>>> __________???
>>>
>>> View the list's information and change your settings at
>>> //www.freelists.org/list/jawsscripts
>>>
>>>
>>
>>
>
>
> -- 
> Christopher (CJ)
> chaltain@xxxxxxxxx
> __________�
>
> 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: