That's awesome! It's sort of depressing though, the depth of your knowledge makes me despair at the progress of my own... I appreciate the opportunity to learn though, so thank you. Bryan ----- Original Message ----- From: "Jamal Mazrui" <empower@xxxxxxxxx> To: <JAWSScripts@xxxxxxxxxxxxx> Sent: Monday, August 03, 2009 12:27 PM Subject: [jawsscripts] Introducing HomerJax script library for accessing Internet data >I have created a JAWS script library for accessing Internet resources > called HomerJax, available at > http://EmpowermentZone.com/HomerJax.zip > > It is a collection of JavaScript functions that become available to JAWS > scripts via the files HomerJax.jsb and HomerJax.wsc. No COM server has to > be registered to access the HomerJax object and its many methods. > > HomerJax.jss currently contains two functions: CreateHomerJax() for > creating the object, and HomerJaxDemo() for running an interactive demo of > its capabilities. The demo shows how you can get the content type, source > HTML, or plain text of a web page; download a file to disk; get public > messages from Twitter.com, or post a tweet if you have an account. The > code accesses data in JSON format (JavaScript Object Notation) as well as > in XML. The demo may be run by launching Notepad and pressing > Alt+JAWSKey+D. > > Documentation is in the files HomerJax.txt and HomerJax.htm. For ease of > learning more via this email message, I am pasting the initial sections of > documentation below. > > I credit list members: Bryan Garaventa for information on the > MSXml2.XMLHTTP object, and Martin Slack for information on the > System.Collections.ArrayList object. > > Jamal > > HomerJax > Beta 0.6 > August 3, 2009 > > Copyright 2009 by Jamal Mazrui > GNU Lesser General Public License (LGPL) > > Contents > > Introduction > Overview > COM Exchange Format > Dialog Methods > File Methods > Folder Methods > HTML Methods > JScript Data Methods > Path Methods > Regular Expression Methods > Registry Methods > Shell Methods > String Methods > Variant Data Methods > Web Request Methods > XML Methods > Development Notes > ---------- > > Introduction > > HomerJax is a library of convenience functions for accessing Internet > resources. It is written in JScript, the Microsoft version of JavaScript, > and is dependent on several COM servers distributed with Windows. The > word "Homer" is a brand name I sometimes use for developer tools I create. > The word "Jax" derives from Ajax, which originally meant "Asynchronous > JavaScript and XML." Ajax technologies focus on building dynamic user > interfaces in web browsers. HomerJax functions use some of these core > technologies, but focus on reading, interpreting, and writing data from > the Internet. > > Since the Internet is a great source of accessible information for people > with visual disabilities who cannot readily read the printed word, my hope > is that this library makes it easier for developers, including blind ones > like myself, to build applications that take advantage of new social > networking sites such as Twitter, FaceBook, and many others. I intend for > HomerJax to be accessible via various programming environments, including > the Windows Script Host, screen reader scripting languages, and other > programming languages via a COM server interface. > > A demonstration program is included that shows how you can easily get the > content type, source HTML, or plain text of a web page; how you can > download a file to disk, how you can get messages from the public timeline > of Twitter.com, or poast a tweet if you have a Twitter account. The demo > shows how data is converted from JavaScript Object Notation (JSON) to what > I call COM exchange format, and how XML data may be conveniently accessed > as well. > > The functionality and documentation of HomerJax will improve over time in > response to comments, questions, and suggestions. Code contributions are > also welcome. > ---------- > > Overview > > HomerJax methods are divided into categories indicated by a prefix at the > beginning of their names: Dialog, File, Folder, Html, Js, Path, RegExp, > Registry, String, Vt, Web, and Xml. By convention, HomerJax variable > names use lower case prefixes to indicate the data type: s for string, i > for integer, n for floating point number, l for list, d for dictionary, > and o for other COM object. Method and variable names use upper camel > case (like the .NET Framework), e.g., XmlGetValue rather than XMLGetValue. > JavaScript is a case-sensitive language, so methods need to be called with > appropriate capitalization. > ---------- > > COM Exchange Format > > The Component Object Model (COM) is a set of Windows standards by which > different programming languages and applications can communicate. COM > uses a flexible data type called a variant, which can be an individual > value, array of values, or complex object with methods, properties, and > events. In general, any COM client can use string, numeric, and COM > objects as the data types of parameters or return values. Some, however, > cannot use arrays. COM exchange format is intended to support > collections, as well as primitive data types, for use by any COM client. > Rather than an array, a list COM object is used from the .NET Framework > (any version). A COM object dictionary is also used from the Windows > Script Host. > > HomerJax includes a method called JsToVt, which converts data in JSON > format to variant types understood by JAWS Script (or any COM client > language). JavaScript arrays are converted to COM objects with the progID > "System.Collections.ArrayList." The methods and properties of this object > are documented at > http://msdn.microsoft.com/en-us/library/system.collections.arraylist.aspx > > JavaScript objects, which are like dictionaries, are converted to COM > objects with the progID "Scripting.Dictionary." This object is documented > at > http://msdn.microsoft.com/en-us/library/x4k5wbx4(VS.85).aspx > > In Visual Basic and other languages, either of these types of object > collections may be iterated with the "For Each" statement. These objects > have an "Item" method, which is the default COM method of the object, so > syntax can succinctly referr to items without even using the "Item" > keyword (just using an integer element of a list or string key of a > dictionary enclosed in parentheses). The code of the demo program > illustrates this in getting public messages from Twitter. > > HomerJax includes various methods for converting between JavaScript Object > Notation (JSON), variant data types, and COM exchange format. This > provides much flexibility for accessing data on the Internet. > > ... > > > __________ > Visit and contribute to The JAWS Script Repository http://jawsscripts.com > > View the list's information and change your settings at > http://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 http://www.freelists.org/list/jawsscripts