Hi Darrell,
I assume from your message that you have no programming experience. If
this is the case I'll be straight up with you: programming NVDA is going
to be a tough road to hoe. I don't want to discourage you. But if you
decide to take it on be prepared to work very hard at it. Here's why and
why I was able to do it in only a few weeks.
1. In Window-Eyes we have a component object model. This is essentially
an interface that defines everything Window-Eyes can do. And along with
that interface we have encyclopedic documentation that shows us how to
do everything, or at least defines how everything works.
Conversely, NVDA is written primarily in Python and has no such
interface. The so-called documentation is the proverbial tip of the
iceberg. So much so that I'm not sure anyone could do anything but the
most simplistic tasks after reading it. The bottom line is that we have
to delve into the code-base of NVDA itself, figure out how it works, and
try to figure out what to do with it. This is not an easy task because
NVDA is very unconventional in my opinion. It tries to do a lot of
"pre-processing" on everything in order to make things generic so they
can fit them into all of the several ways we can access and work with
things, i.e. windows, IAccessible, IAccessible2, UIA, and Java access
bridge. Window-Eyes is much more cut and dry on this front.
Consequently, unlike with Window-Eyes where we get exactly what is
there, we can get illogical problems right up front with NVDA. For
example, in Sound forge there are several non-standard vertical sliders
and horizontal track bars. Window-Eyes just tells me that they are
custom controls, I figure out what they do, and write the necessary code
to make them read the values they change. NVDA's attempt to figure them
out before hand decided that they were edit boxes. This makes absolutely
no sense given the nature of the controls. And I had no idea how to undo
it. Fortunately it was the one question I got the correct answer for on
the NVDA add-ons mailing list. Otherwise, most of what I thought were
basic questions either went unanswered, I got a wrong answer and wasted
days researching it, or I got an "I think so" answer on a real core
component of how NVDA programming works. To be blunt, they've been of
almost no help to me. I still can't believe I got an enormous suite like
Sound forge working.
2. This raises another problem beyond the fact that we have to read a
lot of core code to figure out how NVDA works and how to work with it.
This is another big difference between NVDA and Window-Eyes. When we
write a Window-Eyes script it is a program that Window-Eyes is calling
and running as an external process. The result is that while your script
can crash and burn, it cannot take down Window-Eyes with it. Typically
an error message dialog pops up telling you about the error, where it
is, and gives you the choice to stop or edit the script. Stop the script
and the world is round again.
With NVDA you're in a double-down game of Russian-roulette. Firstly,
writing what they call an "add-on" is writing code that will be injected
into the NVDA program. Break something and you break NVDA. The saving
grace is that if you're writing a program add-on, versus a global
add-on, you can simply close the program. This will unload your add-on
and things should go back to normal. But it's not always that easy,
depending on what the problem with your code was.
I've locked it up completely and had to bail myself out with Window-Eyes
or Narrator and then reload NVDA. Other times I've landed somewhere
in-between where closing the program would bring NVDA back, but, it
would be acting very strange. So I'd have to reload it.
3. One of the things I don't like about Python is the fact that there is
no error checking going on other than that which you explicitly write in
your code. This means that while big problems are big problems, small
problems are also big problems. That is to say, while Mrs. Bladdersplat
might have only taken two points off of your essay for a missing comma,
colon, period, or closing parentheses, in programming it is either right
or wrong. And just one missing punctuation mark is more often than not
deadly. Again, in Window-Eyes and VBScript, an error message would pop
up and tell you what the problem was.
There are two remedies for this. One is something you'll see in most of
the online tutorials on Python. That is the fact that we have a Python
console where we can write code one line at a time or even run a
program. Within the console error checking is done and we'll get error
messages. The problem is that we're not writing stand alone programs. So
we can only do very basic coding in the console because we're writing
programs that need to integrate with both NVDA and the program we're
scripting. Therefore we can't write a script and run it in the console.
It has to be run by NVDA when the