Need Help Writing to JAWS Please!
Posted: Wed Aug 14, 2024 8:41 pm
Hello,
As suggested by my username, I am a person who is blind. Therefore, I would like to be able to programmatically write messages to be spoken and call functions in my JAWS For Windows screen reading software (https://en.wikipedia.org/wiki/JAWS_(screen_reader)).
Thus far, my coding efforts have failed to locate the WriteString function. Also, using OpenLibrary, I can only locate the dll by specifying its full path. I suspect I am going to need to use a Prototype?
The jfwapi.dll is located in the JAWS folder, but not in either of the Windows system folders.
I found it curious that the PureBASIC Help Manual states that each version of the compiler (32-bit or 64-bit) can only work with libraries of same type. Meanwhile, the Prototype example, that I copied and run, was accessing the System32.dll
At the risk of falling foul of forum rules, I will paste below an example from the Freedom Scientific Developers Network FSDN documentation.
If you want your program to make JAWS say, Braille, or do something, you can use the FS API to do it. FSAPI.DLL contains a COM object as well as several exported functions. This means you can call it through COM. You will not have to know where FS API lives on the user system, as you would if it were linked statically. But you can also call FSAPI functions exports as declared in FSAPI.H if COM cannot be used.
We strongly recommend using COM because this obviates the need to determine where on the system FSAPI.DLL resides and dynamically load the library. You cannot really staticly bind to fsapi.lib because your program will not start if FSAPI.DLL does not reside in the same directory as the directory where your program is installed. The COM approach does not suffer from these same limitations.
Note: In Visual Basic, the apostrophe is used for comments rather than the semicolon.
A VBScript example of using the COM object is:
Set o = CreateObject("freedomsci.jawsapi")
' Creates the object variable pointing to FSAPI.
Call o.SayString("Hello and Hi")
' Accesses the member function sayString from FSAPI.
Call o.RunFunction("sayline")
' Accesses the member function sayString from FSAPI.
The available functions are described below.
SayString
NAME SayString
PURPOSE
Instructs Jaws to speak a string of text.
USAGE
SayString(StrinToSpeak,bInterrupt);
PARAMETERS
StrinToSpeak the text to be spoken
bInterrupt whether or not to discard any text already being spoken at the time this function is called. If this parameter is TRUE, any
text currently being spoken will be discarded.
RETURNS
TRUE ifJaws is running and if the text was scheduled to be spoken.
FALSE if the text was not scheduled to be spoken.
REMARKS
This function will return before the text has finished speaking
I would be most grateful for any help with this project!
Wayne
As suggested by my username, I am a person who is blind. Therefore, I would like to be able to programmatically write messages to be spoken and call functions in my JAWS For Windows screen reading software (https://en.wikipedia.org/wiki/JAWS_(screen_reader)).
Thus far, my coding efforts have failed to locate the WriteString function. Also, using OpenLibrary, I can only locate the dll by specifying its full path. I suspect I am going to need to use a Prototype?
The jfwapi.dll is located in the JAWS folder, but not in either of the Windows system folders.
I found it curious that the PureBASIC Help Manual states that each version of the compiler (32-bit or 64-bit) can only work with libraries of same type. Meanwhile, the Prototype example, that I copied and run, was accessing the System32.dll
At the risk of falling foul of forum rules, I will paste below an example from the Freedom Scientific Developers Network FSDN documentation.
If you want your program to make JAWS say, Braille, or do something, you can use the FS API to do it. FSAPI.DLL contains a COM object as well as several exported functions. This means you can call it through COM. You will not have to know where FS API lives on the user system, as you would if it were linked statically. But you can also call FSAPI functions exports as declared in FSAPI.H if COM cannot be used.
We strongly recommend using COM because this obviates the need to determine where on the system FSAPI.DLL resides and dynamically load the library. You cannot really staticly bind to fsapi.lib because your program will not start if FSAPI.DLL does not reside in the same directory as the directory where your program is installed. The COM approach does not suffer from these same limitations.
Note: In Visual Basic, the apostrophe is used for comments rather than the semicolon.
A VBScript example of using the COM object is:
Set o = CreateObject("freedomsci.jawsapi")
' Creates the object variable pointing to FSAPI.
Call o.SayString("Hello and Hi")
' Accesses the member function sayString from FSAPI.
Call o.RunFunction("sayline")
' Accesses the member function sayString from FSAPI.
The available functions are described below.
SayString
NAME SayString
PURPOSE
Instructs Jaws to speak a string of text.
USAGE
SayString(StrinToSpeak,bInterrupt);
PARAMETERS
StrinToSpeak the text to be spoken
bInterrupt whether or not to discard any text already being spoken at the time this function is called. If this parameter is TRUE, any
text currently being spoken will be discarded.
RETURNS
TRUE ifJaws is running and if the text was scheduled to be spoken.
FALSE if the text was not scheduled to be spoken.
REMARKS
This function will return before the text has finished speaking
I would be most grateful for any help with this project!
Wayne