Re: A Short Introduction to Window-Eyes Scripting, and the Window-Eyes Object Model

  • From: "Matthew2007" <matthew2007@xxxxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Sat, 2 Feb 2008 13:35:23 -0800

Very cool!

Thanks for posting this.

Matthew
----- Original Message ----- From: "Macarty, Jay {PBSG}" <Jay.Macarty@xxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Saturday, February 02, 2008 1:08 PM
Subject: FW: A Short Introduction to Window-Eyes Scripting, and the Window-Eyes Object Model


Below is the intro to Window-Eyes scripting recently announced by GW
Micro.

________________________________

From: gw-news@xxxxxxxxxxx [mailto:gw-news@xxxxxxxxxxx]
Sent: Saturday, February 02, 2008 12:24 PM
To: gw-news@xxxxxxxxxxx
Subject: A Short Introduction to Window-Eyes Scripting, and the
Window-Eyes Object Model



As you most likely know by now, the scripting cat is out of the
scripting bag. At ATIA, GW Micro introduced one of the most requested
features in Window-Eyes: support for a scripting language. Not only is
Window-Eyes providing a scripting support, but the method being used is
by far the easiest available in the market today. As time goes on, we
will provide more information. For now, I'd like to provide you with a
small section of the introduction in the Window-Eyes Scripting
documentation.

Enjoy!

*****

The Window-Eyes scripting engine is a COM Automation server. COM
Automation, according to Microsoft, is "a technology that allows
software packages to expose their unique features to scripting tools and
other applications." That means all the guts of Window-Eyes are
accessible through various objects, properties, methods, and events
(these items make up the Window-Eyes Object Model). In addition,
Window-Eyes embeds ActiveScript engines, including VBScript and JScript.
This means that you can create scripts in VBScript, JScript (which is
Microsoft's proprietary version of JavaScript), or any language that
supports COM automation.

Are you a Perl programmer, and want to use PerlScript? Be our
guest. Do you prefer Python? Then why not create your scripts in
ActivePython? Granted, the PerlScript, PythonScript, and similar parsing
engines would need to be installed on machines where the scripts in
those languages are going to be used. But if you're only creating
scripts for yourself, and you happen to be an excellent Perl programmer,
you have the power. Are you a C++ programmer? Are you a Visual Basic
programmer? Do you use VBA, PHP, or .NET? Regardless of the language you
choose, as long as it supports COM Automation, you can make Window-Eyes
sing (literally, if you want).

Unlike other scripting engines' limited exposing of their
interface to other applications and the use of proprietary languages,
Window-Eyes scripting is an open server that not only hosts clients
(i.e. scripts, executables, etc.), but also exposes itself through COM
Automation to other applications. In other words, in addition to
creating scripts that Window-Eyes can host, you can also access
Window-Eyes objects from other programs. The possibilities are endless.

How to Use this Guide

The Window-Eyes Object Model reference is divided into several
sections. The Objects section contains a detailed listing of all
available objects, along with their properties, methods, and events. The
Enumerations section lists all available constants and their values. The
Custom User Interface section talks about creating your own dialogs
using the Window-Eyes scripting engine. Lastly, the Tips & Tricks
section provides a few ways to do common scripting tasks.

The Window-Eyes Object Model reference standardizes with the
VBScript language. All examples, syntax, and other notation will be in
VBScript unless otherwise noted.

What are Objects, Properties, Methods, and Events?

Objects are containers of data, the data being a combination of
properties (or attributes), methods (things you can make an object do),
and events (things that an object causes to happen). Understanding the
organization of an object is best done through analogy.

Imagine a dog as an object. A dog has properties, such as color,
height, weight, breed, and so on. A dog has methods (or functions) such
as sit, speak, stay, roll over, and heel -- these are commands that you
tell a dog to perform. A dog also has events, including barking, tail
wagging, and chasing cars -- these are things that dogs do in their free
time.

What About Syntax?

As mentioned previously, the Window-Eyes Object Model reference
will use VBScript when supplying syntax and examples. It is important to
note, however, that accessing object information is similar in other
programming languages -- you are not restricted to using VBScript. When
you're working with objects, you access properties and methods using a
convention called a dot operator, meaning you use a dot (or period) to
connect an object with a property or method.

For example, to assign a color to a dog object, you might do:

Dog.Color = "Brown"

To command your dog object to perform a task, you might say:

Dog.PlayDead

To listen for your dog object to bark, and then command your dog
object to behave, you might try:

Sub MyDogBarked()
   Dog.Silence
   Dog.Sit
   Dog.Stay
End Sub

Syntax will become clearer as you read through the various
objects sections, and review examples.

More to come!
The gw-news list is an announce only list used for GW Micro news
and product information.




__________ NOD32 2845 (20080202) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com

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

Other related posts:

  • » Re: A Short Introduction to Window-Eyes Scripting, and the Window-Eyes Object Model