Hi,
This function is relatively new, I think since JAWS 2022. Here's my
problem. I have a sound scheme that I use when I'm writing that says the
word "roman" for normal text.This is because in writing, text that
doesn't have any kind of special attributes like bolding is "set roman."
Pressing backspace to delete a character never said "roman" with every
press in a text field before, but now it does, and it drives me crazy.
Here's the default code. Focus your attention on the
GetCharacterInfoForBackspace call (StrChar by reference) and the say
statement for the StrChar variable.
void function DoBackSpace()
var int bRestore,
int textSelected = !StringIsBlank(GetSelectedText())
if CURSOR_PC != GetActiveCursor() then
bRestore = TRUE
SaveCursor ()
PCCursor ()
endIf
If IsVirtualPcCursor ()
If UserBufferIsActive ()
Return; Do not process unless so directed in app-specific
script file
EndIf
;Allow backspace, since it typically goes back a page:
TypeKey(cksBackspace)
if (bRestore) RestoreCursor () endIf
return
EndIf
if IsReadOnlyEditObject()
if (bRestore) RestoreCursor () EndIf
Return
endIf
var
string strChar,
int TheTypeCode,
string sClass,
int containsMarkup
TheTypeCode = GetObjectSubtypeCode()
If TheTypeCode < 1 then
SClass = GetWindowClass (GetFocus ())
If sClass == cwcTTY || sClass == cwcTTYGrab then
BackSpaceMSDos ()
if bRestore then
RestoreCursor ()
endIf
Return
endIf
endIf
If TheTypeCode == WT_TREEVIEW
|| TheTypeCode == WT_LISTVIEW
|| TheTypeCode == wt_ListBox
|| TheTypeCode == wt_listBoxItem
TypeKey(cksBackspace)
if bRestore then
RestoreCursor ()
endIf
return
endIf
GetCharacterInfoForBackSpace(strChar,ContainsMarkup)
TypeKey (cksBackspace)
if TheTypeCode != WT_STATIC then
Say(strChar, OT_CHAR, ContainsMarkup)
if textSelected then
SayFormattedMessage(OT_MESSAGE, cMsgSelectionDeleted,
cmsgSilent)
endIf
endIf
if bRestore then
RestoreCursor ()
endIf
endFunction
One thing I've tried is changing the ContainsMarkup (value of 1)
parameter to 0, but I just end up with this when I backspace. In this
example, I backspace to delete a period with my writing scheme active.
The period character is tucked in here somewhere. lol
<VOICE NAME="NormalVoice">roman</VOICE><LANG LANGID="ENU">.</LANG>
I want to edit the function to stop saying the attribute when I
backspace while my writing scheme is active; I don't need it, and it
slows me down. I've also tried temporarily changing the scheme name back
to classic and then switching back after the say statement, using the
old code of RooteInvisibleToPC and reading the character before the key
press deletes it, and even line segment calls to try and take out the
markup. None of that has worked reliably. Any ideas?
Tony
__________�
View the list's information and change your settings at
//www.freelists.org/list/jawsscripts