Well, it's called a scripting language because that's exactly what it is.
And just like when we learned to read, write, and speak, the bottom line was
drilling it into our heads until we could do it without even thinking about
it. So naturally the beginner is going to have to reference documentation
and examples a lot and keep at it in a consistent enough manner to learn it.
And feeling that writing in a text editor is monotonous is only normal, just
as the repetitive nature of learning anything is.
Some of us have been discussing a tutorial just recently and naturally
everyone has their own ideas regarding the best way to go about it. And of
course there's no one size fits all method that's going to work for
everyone. So while everyone's thinking about it I just started fiddling
around with writing a tutorial. Of course things seem easy when you've been
doing it for 20 years, but when you try to start explaining it you discover
that this has to be explained in order to explain that and you've got to at
least touch on that in order to explain the concept of this which is
necessary in order to explain the point you started out with. So again, it
gets back to how we learned our language. It wasn't in a week, and it wasn't
all at once.
And while I was working on that I pondered the audio option as well,
basically only because a human voice is a nice break from our endless use of
speech synthesizers. But that too slams us right back into the nature of
language. The equivalent of correct grammar and punctuation is referred to
as syntax in a programming language. And the problem is that you don't have
two points taken off for a misspelling or a missing comma. Your script
throws an error and stops working. Luckily, most of the time, syntax error
messages will point you right at the source of the problem so you can
correct it quickly. Even seasoned programmers make a type-o now and again.
So I'm not sure a strictly audio tutorial would work. I suppose it might
because you can reference the audio as much as is needed. But I suspect a
combination of an audio tutorial with text file examples would probably work
better. Listening to the audio can instill the concepts while having an
easily accessible set of example files to really examine would probably be
more helpful once you get down to actually working on writing scripts. Of
course these are already available in VBScript help files as well as the
Window-Eyes scripting manual. But I imagine they could be augmented with a
more cohesive tutorial to begin with. It might give the beginner a more
gentle learning curve to help them tackle scripting without the intimidation
factor overloading them right from the get-go; which I believe is the reason
why so few people script. Even in Jaws land, as long as scripting has been
around, there's still very few users who are scripting.
Regarding the scripting framework? That's probably a good place to start. I
don't actually remember how it works because I just took a look at it when
it came out. But I think that's what it was designed for. And if you really
want to dive right in, download the immediate mode window script. It allows
you to pop up a window and write single lines of code that are executed as
soon as you press ENTER. And VBScript uses the colon (:) as a virtual line
separator so you can actually write more than one line on one line. For
example, if you want to write the following For/Next loop to tell your
synthesizer to count from 1 to 5 and pause for one second between each
number, you'd normally write it in a more structured form in your script,
such as in the following.
For i = 1 To 5
Speak i
Sleep 1000
Next
But you can do the same thing in the immediate mode window or even in your
script if you want to by using colons as in the following.
For i = 1 To 5 : Speak i : Sleep 1000 : Next
In case your mailer wrapped that line and broke it up, it should be one
single line from For to Next.
And that's what I suggest focusing in on first, VBScript. Learn the language
first and just use the Window-Eyes "Speak" command without worrying about
how it works as it's pretty self-explanatory anyway. The one thing to
realize in the context of learning VBScript is that you can use either
variables or literals with the speak command, as in the following.
Literal example.
Speak "Hello world!"
Note the quotes. That's what defines a literal string of text. Now here's
the same thing using a variable. I'll explicitly declare the variable with
the "Dim" statement because I strongly advise doing so. You don't have to,
but not doing so can send you off on wild goose chases due to nothing more
than a type-o. For example, counter and ccounter is pronounced exactly the
same with my synth so I wouldn't have a clue as to that error. But in order
to have this automatically checked and flagged in the event of an error you
must use the following as the first functional statement in your script.
Option Explicit
That's what forces "Dim" statements to be used and causes an error to be
thrown whenever a variable is found that hasn't been defined.
Dim helloString
helloString = "Hello world!"
Speak helloString
You can enter those lines individually in the immediate mode window or put
it all on one line as in the following.
Dim helloString : helloString = "Hello world!" : Speak helloString
Okay. I better quit before I hit chapter two. So that's my 22 cents worth on
the matter.
Regards,
Tom
----- Original Message -----
From: "Keith Hinton" <[email protected]>
To: <[email protected]>
Sent: Saturday, August 21, 2010 10:44 AM
Subject: Window-Eyes Script Writing
Hi,
I learn best through audio examples mainly recordings, etc that
demonstrate tasks, even ones like Window-Eyes scripting.
I have a grasp not an extremely detailed grasp, I will be the first to
admit, but enough of a grasp on the visual basic scripting language to
write VBS scripts for Window-Eyes.
I have listened to a few audio files, such as the CSun files where
Aaron and Doug demonstrated in that four hour training session some of
the scripting concepts, including the beginnings of how to write one.
I had some trouble following along with it though due to the number of
computers talking all at once.
:)
Recently, while browsing through the scripting repository on GW
Micro's Script Central Platform, I noticed a Scripting framework
script.
I was curious if this would be a good starting point as it presents
dialog boxes to the user for writing scripts?
I find the idea of entering a text editor and typing out common blocks
of commands as if I were a computer, somewhat repetitive.
Any other suggestions?
I listened to Jeff Bishups ACB Radio presentation and thought that he
was going to do something on how to write scripts in an audio
form.wich I think that some well-known scriptor of Window-Eyes should
consider doing, as detailed as the Jim Snowbarger searies was on JAWS
for Windows scripting.
Maybe something that spans 5 or 6 episodes of MP3 recordings, wich
each going into more and more topics, ranging from the most basic
speak "Hello World" example, to the most difficult task possible with
Window-Eyes scripting as it stands today?
Curious on that one.
Let me know!
At any rait, I think that something like this should be created in an
MP3 format and the lessons archived on the web somewhere, even if
payment is requried to purchase such recordings.
Maybe someone at GW Micro or elsewhere would have an interest in
designing such a thing?
Jeff mentioned something about it, but I haven't seen anything.
Oh and Jeff..I attempted to send you an emial to your
[email protected] address with a few comments about your Skype
scripts, as well as on the Script Central page for those scripts, but
haven't seen anything.
Are you still around? :)
Thanks again to all!
--
Regards, --Keith
Skype: skypedude1234
MSN Messenger: [email protected]
Yahoo/AIM/Twitter: keithint1234
Facebook: http://facebook.com/keith.hinton1