Hi Alex, Feel free to ask any questions. Almost any language can be used with SayTools. The Samples subfolder contains examples in a dozen different languages. Essentially, any language that can create a COM object and access its properties and methods will work. Also, any language that can run a utility on the command line will work with the SayFile.exe and SayLine.exe tools. Jamal On Fri, 13 Jun 2008, Alex Hall wrote: > Date: Fri, 13 Jun 2008 21:19:28 -0400 > From: Alex Hall <mehgcap@xxxxxxx> > Reply-To: programmingblind@xxxxxxxxxxxxx > To: programmingblind@xxxxxxxxxxxxx, uaccess-l@xxxxxxxxxxxxxx, > guispeak@xxxxxxxxxxxxx, program-l@xxxxxxxxxxxxx, > jawsscripts@xxxxxxxxxxxxx > Subject: re: SayTools 1.3 released > > Can I ask a really stupid question? What languages can you use > with this? Only Python? > > Have a great day, > Alex > > > ----- Original Message ----- > >From: Jamal Mazrui <empower@xxxxxxxxx > >To: uaccess-l@xxxxxxxxxxxxxx, > guispeak@xxxxxxxxxxxxx,programmingblind@xxxxxxxxxxxxx, > program-l@xxxxxxxxxxxxx,jawsscripts@xxxxxxxxxxxxx > >Date sent: Fri, 13 Jun 2008 16:21:47 -0400 (EDT) > >Subject: SayTools 1.3 released > > >http://EmpowermentZone.com/saysetup.exe > > >Version 1.3 adds properties for configuring the voice, rate, and > volume of > >SAPI speech. A new method collects MSAA information from the > current > >window. More documentation and samples show what is possible > with > >SayTools. > > >Special thanks go to the Department of Computer Science at the > University > >of North Carolina, Chapel Hill for the pyAA, pySonic, and pyTTS > libraries > >for Python that SayTools now uses. The revised function list is > below. > > >Jamal > > >Once SayTools is installed on a computer, a COM client may use > the string > >"Say.Tools" as the ProgID (program identifier) for creating an > object with > >several methods and properties summarized below. > > >IsJAWSActive() -- Test whether JAWS is active in memory > > >IsSAActive() -- Test whether System Access is active in memory > > >IsWEActive() -- Test whether Window-Eyes is active in memory > > >JAWSSay(sText) -- Say a string of text via JAWS > > >SASay(sText) -- Say a string of text via System Access > > >WESay(sText) -- Say a string of text via Window-Eyes > > >Say(sText) -- Say a string of text via JAWS, System Access, or > Window-Eyes > >if found, or SAPI if that has been set as the last resort > > >UseSAPI = bState -- Determine whether SAPI speech is used as a > last resort > >if no screen reader is found, a Boolean property that is 1 for > True or 0 > >for False (default is False) > > >SAPIVoice = sVoice -- Determine which SAPI voice is used, a > string > >property > > >SAPIRate = iRate -- Determine the SAPI speech rate, an integer > property > >that is between -10 and 10 for most voices (default is 0) > > >SAPIVolume = iPercent -- Determine the SAPI speech volume, an > integer > >property that is between 0 and 100 (default is 50) > > >SAPIGetVoices() -- Get a list of available SAPI voices, delimited > by a > >line feed character (ASCII 10) > > >SAPISay(sText) -- Say a string of text via SAPI, according to > voice, rate, > >and volume properties > > >SAPIWriteWav(sFile, sText) -- Write sFile in WAV format, > containing sText > >said via SAPI, according to voice, rate, and volume properties > > >PlaySample(sFile, bWait) -- Play an audio sample file that is > loaded into > >memory at once, with an optional Boolean parameter that > determines whether > >to wait for speech to complete before continuing (default is > True) > > >PlayStream(sFile) -- Play an audio stream file that is loaded > sequentially > >due to its size, with an optional Boolean parameter that > determines > >whether to wait for speech to complete before continuing (default > is True) > > >ReadFile(sFile) -- Read and return the content of a file as a > string > > >WriteFile(sFile, sText) -- Write a file containing a string > > >MessageBox(sText, sTitle) -- Show a message box with an optional > title > > >MSAAGetTree() -- Return a string containing the tree structure of > MSAA > >properties that are found in the client region of the forground > window > > >The audio file methods can play recorded voice or sound effects > in MP3, > >OGG, WAV, or other formats. Check the Docs subfolder for > documentation on > >the pySonic module and the FMMOD library that it wraps. > Documentation on > >the pyAA module explains what information is available to screen > readers > >via the Microsoft Active Accessibility API. > > >The ReadFile method may be particularly useful for reading and > then > >running a Python script file, using the following Two methods > that provide > >access to the Python interpreter at runtime: > > >Exec(sCode, v1, v2, v3, v4) -- Execute one or more Python > statements as a > >string that may include varient parameters > > >Eval(sCode, v1, v2, v3, v4) -- Evaluate a Python expression after > >executing preceding Python statements, if any > > >Each method takes five parameters: a string sCode containing the > code to > >be run, and four variant data items that it can use, these being > >referenced as v1, v2, v3, and v4 within the code. Generally, the > variants > >passed are either numbers or Unicode strings. They are optional > and > >default to 0. The return value is also a variant. > > >The Exec method runs one or more Python statements delimited by a > line > >feed character (ASCII 10). The Eval method works similarly > except that > >the last (or only) line of code is evaluated as an expression > (not > >statement), and the result is returned. Besides builtin Python > functions, > >SayTools imports the following Python modules for possible work > in such > >code: comtypes, ctypes, EasyDialogs, os, pyAA, pySonic, pyTTS, > sys, time, > >win32api, win32com.client, and win32gui. For convenient > reference, > >documentation on several of these modules is included in the Docs > >subfolder. > > >The Exec and Eval methods can significantly extend the abilities > of a > >screen reader to interrogate the computer system and perform > useful tasks, > >including ones enabled via dynamic API calls to Windows or third > party > >DLLs. Like any capability, however, this can also be misused, > and so > >should be treated as a security risk with untrusted client > programs. > >Check the Samples subfolder for demonstrations of Exec and Eval, > as well > >as the Python documentation for the many functions available in > the > >imported modules. Although the SayTools COM server loads > relatively > >quickly given its functionality, best performance in a client > program is > >gained by instantiating it once at startup, and then using a > reference to > >the same object over the life of the program. > > >The SayTools command-line utilities are as follows: > > >SayLine.exe sLine -- Say a line of text, passed as a parameter on > the > >command line, using a screen reader if found, or SAPI if not > > >SayFile.exe sFile -- Say a text file, passed as a complete path > on the > >command line, using a screen reader if found, or SAPI if not > > >RunScript.exe sScript -- Run an active JAWS script, either global > default > >or application specific, passed as a complete path on the command > line > > >__________ > >View the list's information and change your settings at > >//www.freelists.org/list/programmingblind > > > __________ > View the list's information and change your settings at > //www.freelists.org/list/programmingblind > __________ View the list's information and change your settings at //www.freelists.org/list/programmingblind