Отправляет email-рассылки с помощью сервиса Sendsay

Screen reader JAWS for Windows Russian

[JFWRus] Scripts for total comander

Здравствуйте, comp.

Друзья, Обращаюсь прежде всего к специалистам по написанию скриптов
для JAWS. Ниже я приведу скрипты от total comander, отвечающие за
чтение следующей, предыдущей и текущей строки. В частности, эти
скрипты отвечают за правильное произнесение выделености файлов. К
сожалению, не знаю, чьи это скрипты, знаю только , что работают они
именно так, как мне хочется. Может кто-нибудь напишет подобный же
скрипт для пробела - в настоящий момент, при нажатии на пробел джоз
читает "неотмечено" вне зависимости от того, выделяется ли файл, или
же выделение снимается. Нужно, чтобы в окне TMyListBox джоз верно
прочитывал выделенность файла при нажатии пробела, а во всех остальных
местах действовал стандартно.

Надеюсь, что приведённые тексты скриптов сведут эту задачу к простому
копированию/вставке. Сам же я просто не понимаю, что означают многие
функции, например, IsVirtualPCCursor (), и где прочитать - не знаю.

Script saynextline ()
var
int TheTypeCode
NextLine()
If GetWindowClass (GetCurrentWindow ()) == "TMyListBox" then
if GetActiveCursor () == 0 then
sayline ()
return
endif
if IsVirtualPCCursor () == 1 then
sayline ()
return
endif
let filename = GetTextInFocusRects (GetCurrentWindow ())
let filecolor = GetColorName (GetColorText ())
SayFocusRect (GetCurrentWindow ())

If GetColorText () != "red" then
SayString ("отмечен")
EndIf

Return

EndIf

if (IsLeftButtonDown ()) then
SelectingText(TRUE)
pause ()
SelectingText(false)
return
endIf
if not IsPCCursor () then
SayLine ()
return
endIf
let TheTypeCode = GetWindowSubTypeCode (GetCurrentWindow ())
If ! TheTypeCode then
Let TheTypeCode = GetObjectSubTypeCode ()
EndIf
If (TheTypeCode == WT_TASKBAR) then
SayWord ()
Return
endIf
if (TheTypeCode == WT_UPDOWNSLIDER) || (TheTypeCode == WT_LEFTRIGHTSLIDER) then
SayWord ()
return
endIf
if (TheTypeCode == WT_TABCONTROL) then
SayWord()
return
endIf
if theTypeCode==wt_edit_spinbox then
Say(GetLine(),OT_LINE)
return
endIf
if theTypeCode==wt_editCombo then
;sayWindow(globalFocusWindow,read_everything)
return
endIf
if CaretVisible () then
SayLine ()
return
endIf
If ((TheTypeCode == WT_MULTISELECT_LISTBOX) || (TheTypeCode == WT_EXTENDEDSELECT_LISTBOX))
then
SayLine()
endIf
If TheTypeCode==WT_TreeView Then
SayTreeViewLevel()
endIf
EndScript

Script saypriorline ()
var
int TheTypeCode
PriorLine()
If GetWindowClass (GetCurrentWindow ()) == "TMyListBox" then
if GetActiveCursor () == 0 then
sayline ()
return
endif
if IsVirtualPCCursor () == 1 then
sayline ()
return
endif
let filename = GetTextInFocusRects (GetCurrentWindow ())
let filecolor = GetColorName (GetColorText ())
SayFocusRect (GetCurrentWindow ())

If GetColorText () != "red" then

SayString ("отмечен")

EndIf

Return

EndIf

if (IsLeftButtonDown ()) then
SelectingText(TRUE)
pause ()
SelectingText(false)
return
endIf
if not IsPCCursor () then
SayLine()
return
endIf
let TheTypeCode = GetWindowSubTypeCode (GetCurrentWindow ())
If ! TheTypeCode then
Let TheTypeCode = GetObjectSubTypeCode ()
EndIf
If (TheTypeCode == WT_TASKBAR) then
SayWord ()
Return
endIf
if (TheTypeCode == WT_UPDOWNSLIDER) || (TheTypeCode == WT_LEFTRIGHTSLIDER) then
SayWord ()
return
endIf
if (TheTypeCode == WT_TABCONTROL) then
SayWord()
return
endIf
if theTypeCode==wt_edit_spinbox then
Say(GetLine(),OT_LINE)
return
endIf
if theTypeCode==wt_editCombo then
;sayWindow(globalFocusWindow,read_everything)
return
endIf
if CaretVisible() then
SayLine()
return
endIf
If ((TheTypeCode == WT_MULTISELECT_LISTBOX) || (TheTypeCode == WT_EXTENDEDSELECT_LISTBOX))
then
SayLine()
endIf
If TheTypeCode==WT_TreeView Then
SayTreeViewLevel()
endIf
EndScript

Script sayline ()
var
int TheTypeCode,
string strVal
;If not PCCursor, let internal processing speak.
If IsSameScript () then
SpellLine ()
Return;
EndIf
If ((! IsPcCursor ()) ||
(IsVirtualPcCursor ())) then
SayLine ()
Return;
EndIf
If GlobalMenuMode then
SayLine ()
Return
EndIf
Let TheTypeCode = GetWindowSubTypeCode (GetFocus ())
;If ! IsVirtualPcCursor () &&
If ! TheTypeCode then
Let TheTypeCode = GetObjectSubTypeCode ()
EndIf
If ((TheTypeCode == WT_MULTISELECT_LISTBOX) ||
(TheTypeCode == WT_EXTENDEDSELECT_LISTBOX) ||
(TheTypeCode == WT_LISTVIEW ) ||
(TheTypeCode == WT_LISTBOX)) then
Let strVal = GetObjectValue ()
If ! strVal then
Let strVal = GetObjectName ()
EndIf
if GetWindowClass (GetCurrentWindow ()) == "TMyListBox" then
saystring (getline ())
if GetColorName (GetColorText ()) == "red" then
saystring ("отмечен")
else
saystring ("неотмечен")
endif
return
endif
SayMessage (OT_LINE, strVal)
SayMessage (OT_POSITION, PositionInGroup ())
Return
EndIf
If CaretVisible () then
If TheTypeCode != WT_EDITCOMBO then;Edit combos should not speak FormatAndText
info.
let globalSayingCurrentItem = 1
EndIf
EndIf
SayLine ()
let globalSayingCurrentItem = 0
EndScript

Void Function NewTextEvent (handle hwnd, string buffer, int nAttributes,
int nTextColor, int nBackgroundColor, int nEcho, string sFrameName)
; Handles all newly written text. If the text is contained in a
; frame, then the frame name is passed as a parameter
; handle MSN conversations wanting attention
CheckForUrgentConversation (hwnd, buffer)
if (ProcessSelectText(nAttributes,buffer)) then
return
endIf
if (nAttributes& ATTRIB_HIGHLIGHT) then
SayHighlightedText(hwnd,buffer)
else
SayNonHighlightedText(hwnd,buffer)
endIf
If GetWindowClass (GetCurrentWindow ()) != "TMyListBox" then
return
endif
if filename != GetTextInFocusRects (GetCurrentWindow ()) then
saystring (GetTextInFocusRects (GetCurrentWindow ()))
endif
let filename = GetTextInFocusRects (GetCurrentWindow ())
if filecolor != GetColorName (GetColorText ()) then
saystring (filename)
if GetColorName (GetColorText ()) == "red" then
saystring ("отмечен")
else
saystring ("неотмечен")
endif
endif
let filecolor = GetColorName (GetColorText ())
EndFunction

Ответить   Михаил Духонин Tue, 28 Mar 2006 14:39:50 +0400 (#531836)

 

Ответы:

Здравствуйте, Михаил.
Попробуйте сделать "обертку" для пробела, используя уже имеющиеся скрипты (то
есть те, которые вы привели в сообщении). Примерно
так:

Script SpaceBarHandling ()

{SpaceBar}

Pause ()

if (GetWindowType (GetCurrentWindow ()) == "TMyListBox") then

/* вызываем скрипт чтения строки */

PerformScript sayline ()

Endif

EndScript

Назначьте скрипту в качестве активной клавиши пробел.
Успехов. Анатолий.

***
Это сообщение No3524
было разослано для 299 участников дискуссионного листа
[JFWRus] Re: Scripts for total comander

Ответить   "i_chay" Tue, 28 Mar 2006 18:21:33 +0500 (#531893)

 

Здравствуйте, i_chay.

Вы писали вторник 28 марта 2006 г., 17:21:33:

Ваш вариант почему-то не заработал. Однако,, немного подумав, я решил
ывдрать из скрипта SayNextLine фрагмент, заключённый в первую
конструкцию if ... then, которая как раз и отвечает за озвучку
TMyListBox'а, и вот что получилось:

Script spacebarhandling ()
SpeechOff ()
{SpaceBAR}

Pause ()
SpeechOn ()
If GetWindowClass (GetCurrentWindow ()) == "TMyListBox" then
if GetActiveCursor () == 0 then
sayline ()
return
endif
if IsVirtualPCCursor () == 1 then
sayline ()
return
endif
let filename = GetTextInFocusRects (GetCurrentWindow ())
let filecolor = GetColorName (GetColorText ())
SayFocusRect (GetCurrentWindow ())

If GetColorText () != "red" then
SayString ("отмечен")
EndIf

Return

EndIf

EndScript

Вроде заработало как нужно.

Ответить   Михаил Духонин Tue, 28 Mar 2006 20:02:06 +0400 (#531998)

 

это моя попытка сделать то чего я не понимаю типо не было сообщений
унинспектид word но нужен так сказать загрузчик для скрипта вначале скрипта
который дал бы возможность релализовать так для каждого проекта. с уважением
пытаюсь что-то придумать ваш андрюша http://andy19902006.narod.ru/ или ico
207081689.

Script spacebarhandling ()

SpeechOff ()

{SpaceBAR}

Pause ()

SpeechOn ()

If GetWindowClass (GetCurrentWindow ()) == "TMyListBox" then

if GetActiveCursor () == 0 then

sayline ()

return

endif

if IsVirtualPCCursor () == 1 then

sayline ()

return

endif

GetColorName (GetColorText ())

If GetColorText () != "red" then

SayString ("отмечен")

EndIf

Return

EndIf

EndScript

***
Это сообщение No3543
было разослано для 301 участников дискуссионного листа
[JFWRus] Scripts for total comander

Ответить   Sun, 2 Apr 2006 11:37:31 +0400 (#533254)