Umm, Doug Lee's Skype scripts have a lot of functionality. Not sure why you'd
want to reinvent the wheel?
But if you want to do it for practice, have a look at his feature list, more
effective than asking here considering...
www.Dlee.org
-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of jason
Sent: Friday, September 8, 2017 9:23 AM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] skype version 7
Hello every one
I am working on scripting skype version 7
I have found away of found the search box and the message box .
I am wondering what other parts need to be done ?
here is the code so far
Include "HJConst.jsh"
Include "HJGlobal.jsh"
include "HjHelp.jsh"
include "UIA.jsh" ; newer UIA support for link item text.
Include "Common.jsm"
Include "TutorialHelp.jsm"
Include "MSAAConst.jsh"
include "Windows Live Messenger.jsm"
Include "Skype.jsm"
Include "Skype.jsh"
import "SkypeWatch.jsd"
import "touch.jsd"
Messages
@MSG_AddContactName
%1, %2
@@
EndMessages
Const
SC_Comma = ",",
scSkype4="4.0"
Globals
int g_previousItemNumber, ; for ProcessConversationItem script.
int giFNConversationsList,
int gbEnterInChatField, ; for obliteration of speaking that you are
typing when hitting enter to send outgoing chat message.
int giProgramMajorVersion,
Int giTotalContacts,
Int giDefaultFirstTime,
String GSPreviousItem,
Int giSkype4FocusChanged,
Int giPrevItem,
int giYCoord,
int GlobalTutorSuppress,
int giFn_FocusChatFromParent
string function GetChatHistoryItemName (handle hwnd)
if getWindowClass (hwnd) != wc_notification_incoming_chat then return endIf
var
object ConversationItem = GetUIAObjectTree (hwnd),
string ItemName = GetObjectName (TRUE)
if ConversationItem then
ConversationItem = ConversationItem.FirstChild.FindByKeyboardFocus(1)
endIf
if conversationItem then ItemName = ConversationItem.name endIf
return ItemName
endFunction
Void Function AutoFinishEvent()
;from when help windows for example links are activated.
let ghHelpWindow=Null()
unscheduleFunction (giFN_UpdateChats)
giFN_UpdateChats = ScheduleFunction
("NotificationsCollectionUpdateChats", 20)
UnscheduleFunction (giFn_FocusChatFromParent)
EndFunction
Void Function AutoStartEvent ()
var
String sFullVersion
;The following was moved to SkypeWatch::DestroyOldSkypeAlerts
;as it should have been, otherwise Skype focus stops incoming caller
notifications.
;unScheduleFunction (giFN_RepeatLastCall)
;if ghwndLastNotify then
;ghwndLastNotify = null ()
;endIf
gbLastCallCameFromAlert = FALSE
let sFullVersion = GetVersionInfoString (GetAppFilePath (), cmsg283_L)
If (! giDefaultFirstTime)
&& StringCompare(sFullVersion,scSkype4)==0 then
Say (FormatString(MSG_UpdateRequest), OT_JAWS_MESSAGE)
EndIf
let giDefaultFirstTime = 1
let giProgramMajorVersion = GetProgramVersion(GetAppFilePath())
EndFunction
int function isMultiPageDialog ()
var handle hWnd = getFocus ()
if FindWindow (GetRealWindow (hwnd), "TAccessiblePageControl") then
return TRUE endIf ; New accessible page control in Skype 6.11 and later
while (hwnd && getWindowClass (hwnd) != wc_Dialog_Page)
hwnd = getParent (hwnd)
if getWindowClass (hwnd) == wc_Dialog_Page then return TRUE endIf
endWhile
return FALSE
endFunction
string function getDialogPageName ()
var
handle hWnd,
object o,
int ChildID,
string sName = getDialogPageName (),
int i, int count
if ! stringIsBlank (sName) then return sName endIf
hwnd = FindWindow (GetRealWindow (GetFocus ()), "TAccessiblePageControl")
o = GetUIAObjectTree (hwnd)
if o then
sName = (o.FirstChild.Name)
; since the type code is included in the name string, and we do not
want it:
var string tmp = getWindowType (hwnd)
if StringCompare (Tmp, StringRight (sName, StringLength (Tmp))) ==
0 then
sName = StringChopRight (sName, StringLength (Tmp))
endIf
if ! StringIsBlank (sName) then return sName endIf
endIf
hwnd = findWindow (getRealWindow (getFocus ()), "TOptionsPanel", "")
if ! hwnd then return sName endIf
o = GetObjectFromEvent (hwnd, -4, ChildID, 0)
if ! o then return sName endIf
count = o.accChildCount
for i=0 to Count
if o.AccState(i) & STATE_SYSTEM_SELECTED then
sName = o.accName(i)
endIf
if ! stringIsBlank (sName) then return sName endIf
endFor
endFunction
string function GetSkypeOptionsTreeViewItemName ()
var
handle hwnd,
object o, int childID,
int i,
string name
let hwnd = getFocus()
if getWindowClass(hwnd) == wc_dialog_pages_tree then
let o = getObjectFromEvent(hwnd, ObjID_Client, 0, childID)
if o then
let i = o.accFocus +0
let name = o.accName(i)
while i > 1
let i = i -1
if o.accValue(i) == 0 then
let name = formatString("%1, %2", o.accName(i), name)
return name
endIf
endWhile
return name
endIf
endIf
return ""
endFunction
void function SayTreeViewItem()
var string SkypeOptionsTreeViewItemName = GetSkypeOptionsTreeViewItemName ()
if ! stringIsBlank (SkypeOptionsTreeViewItemName) then
return sayMessage (OT_LINE, SkypeOptionsTreeViewItemName)
endIf
return SayTreeViewItem()
endFunction
void function ShiftTabKey ()
ShiftTabKey ()
delay (1, TRUE)
if GetObjectSubtypeCode (TRUE) == WT_DIALOG_PAGE
&& StringIsBlank (GetObjectName (TRUE))
; this is a parent object that should not be gaining focus for any
rational reason.
ShiftTabKey ()
endIf
endFunction
void function TabKey ()
TabKey ()
delay (1, TRUE)
if GetObjectSubtypeCode (TRUE) == WT_DIALOG_PAGE
&& StringIsBlank (GetObjectName (TRUE))
; this is a parent object that should not be gaining focus for any
rational reason.
TabKey ()
endIf
endFunction
Script ScriptFileName()
var
int iVersion
let iVersion=GetProgramVersion(GetAppFilePath())
ScriptAndAppNames (FormatString(msgSkypeVersion,intToString(iVersion)))
EndScript
void Function ConversationsList (handle hwnd)
var
object oContactList,
Int iContacts,
Int iChildID,
Int iTemp,
Int iLoop,
String sContactList
unScheduleFunction (giFNConversationsList)
giFNConversationsList = 0;
let oContactList = GetObjectFromEvent (hWnd, OBJID_CLIENT, iChildID, iTemp)
If oContactList then
let iContacts = oContactList.accChildCount
If giTotalContacts != iContacts then
let giTotalContacts = iContacts
if (iContacts > 100)
;more than 100 contacts can cause JAWS to hang because of
too many cross-process calls:
iLoop = iContacts-99 ; get the final 99 contacts rather
than cross processing around and hanging.
endIf
While iLoop < iContacts
let iLoop = iLoop + 1
let sContactList = FormatString (MSG_AddContactName,
sContactList, oContactList.accName (iLoop))
EndWhile
SayMessage (OT_STATUS, FormatString (MSG_ContactsLeft_L,
IntToString (iContacts), sContactList), FormatString
(MSG_ContactsLeft_S, IntToString (iContacts)))
Return
EndIf
EndIf
endFunction
Void Function SayNonHighlightedText (handle hwnd, string buffer)
var
Handle hFocus,
String sWindowClass,
String sOutputWindowClass
let hFocus = GetFocus ()
let sWindowClass = GetWindowClass (hFocus)
let sOutputWindowClass = GetWindowClass (hWnd)
unScheduleFunction (giFNConversationsList)
giFNConversationsList = 0;
if sWindowClass == WC_ContactList then ; Skype prior to 4.0
; ActiveItemChangedEvent handles it.
return
endIf
If sWindowClass == WC_ContactListFilterEdit
&& (sOutputWindowClass == WC_Skype4ContactList
|| sOutputWindowClass == WC_ConversationList) then
let giFNConversationsList = scheduleFunction
("ConversationsList("+intToString(hwnd)+")", 1)
EndIf
SayNonHighlightedText (hwnd, buffer)
EndFunction
Void Function SayHighLightedText (handle hwnd, string buffer)
var
Handle hFocus,
Handle hRealWindow,
String sRealWindowClass,
String sOutputWindowClass,
string sFocusClass,
String sItem
let hFocus = GetFocus ()
let hRealWindow = GetRealWindow (hFocus)
let sRealWindowClass = GetWindowClass (hRealWindow)
let sFocusClass = GetWindowClass (hFocus)
let sOutputWindowClass = GetWindowClass (hWnd)
If sRealWindowClass == WC_OptionsDialogue
&& (sFocusClass == WC_OptionsTreeView
|| sFocusClass == WC_Edit)
|| sFocusClass == wc_dialog_pages_tree then
; In case we are in the options tree view we do not need any
highlighted text announcement to avoid announcement of weird messages...
Return
EndIf
;prior to Skype 4 and above:
if sRealWindowClass==WC_OptionsDialogue then
If GetWindowClass(hwnd)== WC_Listbox then
sayHighlightedText(hFocus,buffer)
delay(1,true)
SayCheckableListboxItemState()
return
endIf
endIf
; Skype 4 specific...
If sRealWindowClass == WC_Skype4OptionsDialogue
&& sOutputWindowClass == WC_Skype4CheckableListbox then
; In case we are in the options tree view we do not need any
highlighted text announcement to avoid announcemnt of weird messages...
Return
EndIf
If sOutputWindowClass == WC_Skype4ContactList
|| sOutputWindowClass == WC_ContactList
|| sOutputWindowClass == WC_ConversationList
|| sOutputWindowClass == WC_Listbox2
|| sOutputWindowClass==WC_ContactList then
; let ActiveItemChangedEvent handle it.
Return
EndIf
If sOutputWindowClass == WC_Listbox then
If hWnd == hFocus then
let sItem = GetLine ()
If sItem != GSPreviousItem then
Say (GetLine (), OT_SELECTED_ITEM)
let GSPreviousItem = sItem
EndIf
EndIf
Return
EndIf
If sOutputWindowClass == WC_Skype4SkypeStyleMenuBar then
; ScreenStabilizedEvent handles it.
Return
EndIf
SayHighLightedText (hWnd, buffer)
EndFunction
int function GetLinkItemCoordinates (string linkText, int byRef x, int
ByRef y)
var
handle hWnd = FindWindow (GetAppMainWindow (GetFocus ()),
wc_notification_incoming_chat),
int count = 0,
object UIA = CreateObjectEx ("FreedomSci.UIA", 0,
"UIAScriptAPI.x.manifest" ),
object TextCondition,
object element, object links
if ! UIA then return endIf
if ! hwnd || ! IsWindowVisible (hwnd) then
hwnd = findWindow (GetRealWindow (GetFocus ()),
wc_notification_incoming_chat)
endIf
if ! hwnd then return endIf
element = UIA.GetElementFromHandle(hWnd)
if ! element then return endIf
TextCondition = UIA.CreateStringPropertyCondition( UIA_NamePropertyID,
LinkText);
if ! TextCondition then return endIf
element = element.FindFirst(TreeScope_Descendants, TextCondition)
if ! element then return endIf
links = FindAllUIAElementsOfType(UIA_HyperlinkControlTypeID, element)
count = links.count
; because these arrays are 0-based, rendering the count to be one off:
count = count -1
element = links(count)
element.GetClickablePoint( IntRef(x),IntRef(y))
endFunction
void function ActivateLinkItem (int x, int y)
UserBufferClear ()
UserBufferDeactivate ()
InvisibleCursor ()
MoveTo (x, y)
RoutePcToInvisible ()
endFunction
int function MagSetFocusToConversationItem (object ConversationItem)
var
collection rect,
string ConversationXML ,
string rectString,
object ItemNode,
object Attributes,
object msxml = CreateObject("msxml2.DOMDocument.6.0")
if !msxml then return EndIf
msxml.async = false;
msxml.resolveExternals = false;
ConversationXML = conversationItem.GetXML(true)
msxml.loadXML(ConversationXML)
ItemNode = msxml.SelectSingleNode("/item")
if ! ItemNode then return FALSE EndIf
Attributes = ItemNode.Attributes
if ! Attributes then return FALSE endIf
rectString = (Attributes.GetNamedItem("Rect").nodeValue)
rect = new collection
Rect.left = StringStripAllBlanks (StringSegment (rectString, ",", 1))
Rect.Top = StringStripAllBlanks (StringSegment (rectString, ",", 2))
Rect.Right = StringStripAllBlanks (StringSegment (rectString, ",", 3))
Rect.Bottom = StringStripAllBlanks (StringSegment (rectString, ",", 4))
if rect.bottom <= rect.top || rect.right <= rect.left then return FALSE
endIf
return MagSetFocusToRect (rect.left, rect.right, rect.top, rect.bottom)
endFunction
int function ProcessConversation (handle hwnd, int item, optional int
bExcludeTypingNotification, optional int SameScript)
var
object conversation,
collection rect, ; for clickable points in links:
string sText, string Description,
int NumberOfMessages,
int i, int ChildCount;
conversation = GetUIAObjectTree (hwnd)
if ! conversation then return endIf ; no UIA, no conversation in progress.
; remove background blocking timer:
if item == 0 then
endIf
rect = new collection
conversation = conversation.FirstChild
while (conversation.nextSibling)
conversation = conversation.nextSibling
endWhile
ChildCount = conversation.ChildCount
conversation = conversation.FirstChild
for i=1 to ChildCount
if conversation.NextSibling then Conversation =
Conversation.NextSibling endIf
endFor
; in case the final siblings have no names as of yet,
; they are sometimes there as placeholders to be filled in:
while (conversation.PriorSibling && stringIsBlank (Conversation.name))
Conversation = conversation.PriorSibling
endWhile
; prevent duplicate reading of items 1 and 2:
if bExcludeTypingNotification ; from on demand keys
|| conversation.IsOffscreen then ; false 'is typing' message.
if conversation.State & STATE_SYSTEM_UNAVAILABLE
|| conversation.State & STATE_SYSTEM_FLOATING then
Conversation = Conversation.PriorSibling
endIf
endIf
for i=1 to Item-1 ; // Don't go back where item is the most recent
Conversation = Conversation.PriorSibling
while (Conversation && conversation.role != ROLE_SYSTEM_LISTITEM)
Conversation = Conversation.PriorSibling
endWhile
endFor
if bExcludeTypingNotification then
NumberOfMessages = conversation.Parent.ChildCount
if item > ChildCount then
;sayMessage (OT_ERROR, formatString
(msgBeginningOfConversation, NumberOfMessages))
; The item count in this list is pretty sporadic, with some
missing items on board.
;So for now don't format with the actual text of messages:
sayMessage (OT_ERROR, msgBeginningOfConversation)
return TRUE
endIf
endIf
;For very first entry after history list is deleted,
;ensure we are actually on a list item.
while (Conversation && conversation.role != ROLE_SYSTEM_LISTITEM)
Conversation = Conversation.PriorSibling
endWhile
if conversation.role == ROLE_SYSTEM_LISTITEM then
; Magnification focus will go to the conversation item as it comes in:
if bExcludeTypingNotification && SameScript then
UserBufferClear ()
sText = Conversation.Name
if ! stringStartsWith (sText, "[") then
; this is a call and contains date time information in the
description field:
Description = conversation.Description
sText = sText + cscBufferNewLine + Description
endIf
Rect.TempString =
SkypeWatch::RemoveTimeStampFromSkypeChatMessage (sText)
rect.TempString = StringChopLeft (rect.TempString,
StringLength(StringSegment (rect.TempString, ",", 1))+1)
if StringContains (rect.TempString, "://") ; && StringContains
(rect.TempString, "://") < 10
;The AccessibleTreeBuilder rect is wrong,
; and FindString is unreliable,
; so using newer UIA support to get coordinates.
; Both can be used simultaneously, albleit different object.
var int x, int y
GetLinkItemCoordinates (Conversation.name, x, y)
rect.x = x rect.y = y
rect.func = formatString ("ActivateLinkItem(%1,%2)",
rect.x, rect.y)
Rect.TempString = StringTrimLeadingBlanks
(StringTrimTrailingBlanks (Rect.TempString))
SayMessage (OT_USER_BUFFER, StringChopRight (sText,
StringLength (rect.TempString)))
UserBufferAddText (Rect.TempString, rect.func, rect.TempString)
UserBufferAddText (cscBufferNewLine+cMsgBuffExit)
return TRUE
endIf
SayMessage (OT_USER_BUFFER, sText)
UserBufferAddText (cscBufferNewLine+cMsgBuffExit)
return
EndIf
sText = StringTrimLeadingBlanks (conversation.name)
if ! stringStartsWith (sText, "[") then
Description = conversation.Description
sText = sText + cscBufferNewLine + Description
endIf
if ! stringIsBlank (sText) then
if item == 0 then
; for newer versions of Skype, prevent double repeating
when user is typing:
if gstrLastConversationItem == conversation.name then
return endIf
gstrLastConversationItem = conversation.name ; entire
conversation set aside to prevent backgroun repeating.
endIf
sayMessage (OT_SCREEN_MESSAGE, sText)
BrailleMessage (sText)
return TRUE
endIf
endIf
; this keeps the background notification from repeating:
return FALSE
endFunction
Script ReadHistoryItem (optional string sNumber)
var
int SameScript,
handle hWnd,
int item
if StringContainsChars (sNumber, "1234567890") then
item = stringToInt (sNumber)
else
item = stringToInt (StringSegment (GetCurrentScriptKeyName (), "+",
-1))
endIf
;control shift 0 = read the tenth one back
if item == 0 then item = 10 endIf
hwnd = findWindow (getAppMainWindow (getFocus ()),
wc_notification_incoming_chat )
if ! hwnd then
sayMessage (OT_ERROR, msgConversationWindowNotFound)
return
endIf
; properly manage multiple key presses activating this script:
if IsSameScript ()
&& (GetRunningFSProducts () & product_JAWS) then
SameScript = (Item == g_previousItemNumber)
g_previousItemNumber = item
else
g_previousItemNumber = item
endIf
if ! ProcessConversation (hwnd, item, TRUE, SameScript) then
sayMessage (OT_ERROR, formatString (msgNthConversationNotFound, item))
return
endIf
endScript
Script SkypeReadHistoryItem ()
PerformScript ReadHistoryItem ()
EndScript
void function ScreenStabilizedEvent(handle hwndLastScreenWrite)
var
handle window = hwndLastScreenWrite, ; for new Skype chat history
Int iLeft,
Int iTop,
Int iBottom,
Int iRight,
String sOutputWindowClass,
String sItem
let sOutputWindowClass = GetWindowClass (window)
;if sOutputWindowClass== wc_notification_incoming_chat2 then
;endIf
if sOutputWindowClass == wcSkypeWidget then
window = FindWindow (GetAppMainWindow (GetFocus ()),
wc_notification_incoming_chat)
endIf
if ! window then window = hwndLastScreenWrite endIf ; older functionality
let sOutputWindowClass = GetWindowClass (window)
If sOutputWindowClass == wc_notification_incoming_chat then
;SkypeWatch::AddNotificationWindowToCollection
(hwndLastScreenWrite, NOTIFIER_CHAT)
ProcessConversation (window, 0, gbEnterInChatField)
gbEnterInChatField = FALSE
return
endIf
If sOutputWindowClass == WC_Skype4SkypeStyleMenuBar then
If GetWindowRect (hwndLastScreenWrite, iLeft, iRight, iTop,
iBottom) then
let sItem = GetTextInRect (iLeft, iTop, iRight, iBottom,
ATTRIB_HIGHLIGHT, IgnoreColor, IgnoreColor, FALSE)
If ! StringIsBlank (sItem) then
If GlobalMenuMode != MENUBAR_ACTIVE then
MenuModeEvent (hwndLastScreenWrite, MENUBAR_ACTIVE)
EndIf
Say (sItem, OT_SCREEN_MESSAGE)
TutorMessageEvent (hwndLastScreenWrite, MENUBAR_ACTIVE)
Return
Else
If GlobalMenuMode == MENUBAR_ACTIVE then
MenuModeEvent (hwndLastScreenWrite, MENU_INACTIVE)
FocusChangedEvent (GetFocus (), hwndLastScreenWrite)
TutorMessageEvent (hwndLastScreenWrite, MENU_INACTIVE)
Return
EndIf
EndIf
EndIf
EndIf
if sOutputWindowClass ==wc_contactList
&& GetWindowClass(GetFocus())!=wc_ContactList then
return ;prevent extra chattter.
endIf
ScreenStabilizedEvent(hwndLastScreenWrite)
EndFunction
Void Function ActiveItemChangedEvent (handle curHwnd, int curObjectId,
int curChildId, handle prevHwnd, int prevObjectId, int prevChildId)
var
Handle hRealWindow,
string sHistoryItemName = GetChatHistoryItemName (getFocus ()),
String sRealWindowClass,
String sWindowClass,
int iObjectType,
String sObjectName,
String sObjectDescription,
String sTemp,
Int iOption
if ! StringIsBlank (sHistoryItemName) then
sayMessage (OT_LINE, sHistoryItemName)
return
EndIf
;Screen Sharing control where screens are stored:
let iObjectType=GetObjectSubtypeCode(true)
if getWindowClass (curHWnd) == wc_ScreenSharing && iObjectType ==
WT_LISTBOX then
return HandleCustomWindows (curHWnd)
endIf
let hRealWindow = GetRealWindow (curHWnd)
let sRealWindowClass = GetWindowClass (hRealWindow)
let sWindowClass = GetWindowClass (curHWnd)
let sObjectName = GetObjectName (TRUE)
let sObjectDescription = GetObjectDescription (TRUE)
If sRealWindowClass == WC_OptionsDialogue then
if sWindowClass == WC_OptionsTreeView then
SayMessage(ot_selected_item,sObjectName)
sayMessage(ot_smart_help,sObjectDescription)
Return
EndIf
if sWindowClass==wc_ChatAppearanceListboxControl then
if isWinVista() then
return ; SayLineUnit handles it more reliably.
else
let
sTemp=GetWindowTextEx(GetParent(GetPriorWindow(curHwnd)),false,true)
endIf
SayMessage(ot_highlighted_screen_text,sTemp)
return
endIf
endIf
If sRealWindowClass == WC_Skype4OptionsDialogue
&& sWindowClass == WC_OptionsTreeView then
SayMessage(ot_selected_item,sObjectName)
sayMessage(ot_smart_help,sObjectDescription)
let giPrevItem = CurChildID
let giYCoord=getCursorRow()
Return
EndIf
If sWindowClass == WC_Skype4ContactList
|| sWindowClass == WC_ConversationList
|| sWindowClass == WC_HistoryList then
; To avoid annoying 'Not Selected' announcement before each element...
let iOption=getJCFOption (OPT_INDICATE_SELECTED)
SetJCFOption (OPT_INDICATE_SELECTED, 1)
Say (GetObjectName (TRUE), OT_SELECTED_ITEM)
SetJCFOption (OPT_INDICATE_SELECTED, iOption)
Return
EndIf
If sWindowClass == WC_AccessibleCheckableListbox then
let sTemp = StringSegment (sObjectName, SC_Comma + cScColon, 2) +
cScSpace + StringSegment (sObjectName, SC_Comma + cScColon, 4)
Say (sTemp, OT_SELECTED_ITEM)
IndicateControlState (WT_LISTBOX, GetControlAttributes ()& 1)
Return
EndIf
If sWindowClass == WC_Skype6CheckableListBox
iOption = GetJCFOption (OPT_MSAA_Mode)
SetJCFOption (OPT_MSAA_Mode, 2)
EndIf
ActiveItemChangedEvent (curHwnd, curObjectId, curChildId, prevHwnd,
prevObjectId, prevChildId)
If sWindowClass == WC_Skype6CheckableListBox
SetJCFOption (OPT_MSAA_Mode, iOption)
EndIf
EndFunction
String Function StringSplitOnLargeLetters (string sStringToParse)
var
Int iLength,
Int iLoop,
String sChar,
String sResult
let iLength = StringLength (sStringToParse)
While iLoop < iLength
let iLoop = iLoop + 1
let sChar = SubString (sStringToParse, iLoop, 1)
If ! StringIsBlank (sChar)
&& ! StringCompare (sChar, StringUpper (sChar), TRUE)
&& ! StringIsBlank (sResult) then
let sResult = sResult + LIST_ITEM_SEPARATOR
EndIf
let sResult = sResult + sChar
EndWhile
Return sResult
EndFunction
/*
String Function GetGroupName (int iPageNumber, handle hWnd)
var
Int iType,
Int iChildID,
Int iTemp,
Handle hReal,
Handle hPage,
Handle hRadioButton,
Handle hCheckBox,
Handle hComboBox,
Handle hTemp,
Handle hTreeview,
String sClass,
String sRadioButtonName,
String sCheckBoxName,
String sComboBoxName,
String sPageText,
String sLabel,
String sWinName,
String sSegment,
String sTemp,
String sObjName,
String sObjDescription,
String sObjValue,
String sHelpMessage
let hReal = GetRealWindow (hWnd)
let sClass = GetWindowClass (hWnd)
let sWinName = GetWindowName (hWnd)
let iType = GetWindowSubtypeCode (hWnd, TRUE)
If ! iType then
let iType = GetObjectSubTypeCode (TRUE)
EndIf
let sObjName = GetObjectName (TRUE)
let sObjDescription = GetObjectDescription (TRUE)
let sObjValue = GetObjectValue (TRUE)
If iPageNumber == 1 then
; Handling of the first page...
let hPage = FindWindow (hReal, WC_Page, WN_GeneralPage)
let sPageText = GetWindowTextEx (hPage, FALSE, FALSE)
If sClass == WC_RadioButton then
let hTemp = GetLastWindow (hWnd)
If hTemp then
let sTemp = GetWindowName (hTemp)
let sLabel = StringLeft (sPageText, StringContains
(sPageText, sTemp) - 2)
Return (sLabel)
EndIf
EndIf
; link handling on the first page...
If sClass == WC_Link then
let hComboBox = FindWindow (hPage, WC_ComboBox, cScNull)
If hComboBox then
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, sWinName) + StringLength (sWinName))
let sComboBoxName = GetWindowName (hComboBox)
let sLabel = StringChopLeft (sLabel, StringContains
(sLabel, sComboBoxName) + StringLength (sComboBoxName))
Return (sLabel)
EndIf
EndIf ; End of first page handling...
ElIf iPageNumber == 2then
; second page handling...
let hPage = FindWindow (hReal, WC_Page, WN_AudioPage)
let sPageText = GetWindowTextEx (hPage, FALSE, FALSE)
If sClass == WC_Link
&& (GetWindowClass (GetPriorWindow (hWnd)) == WC_Link
|| (! GetPriorWindow (GetPriorWindow (GetPriorWindow (hWnd))))) then
let hComboBox = FindWindow (hPage, WC_ComboBox, cScNull)
If hComboBox then
let sComboBoxName = GetWindowName (hComboBox)
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, sComboBoxName) + StringLength (sComboBoxName))
Return (sLabel)
EndIf
EndIf ; Second page finished...
ElIf iPageNumber == 4
|| iPageNumber == 13 then
; fourth and thirteenth page handling...
let hPage = FindWindow (hReal, WC_Page, WN_VideoPage)
let sPageText = GetWindowTextEx (hPage, FALSE, FALSE)
If sClass == WC_RadioButton then
If GetWindowClass (GetPriorWindow (GetParent (hWnd))) ==
WC_ScrollBox then
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, cScColon) + 1)
let sLabel = StringLeft (sLabel, StringContains (sLabel,
SC_Dots) + 2)
Return (sLabel)
Else
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, SC_Dots) + 3)
let sLabel = StringLeft (sLabel, StringContains (sLabel,
SC_Dots) + 2)
Return (sLabel)
EndIf
EndIf
If sClass == WC_Link then
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, SC_Dots) + 3)
let sLabel = stringChopLeft (sLabel, StringContains (sLabel,
SC_Dots) + 3)
Return (sLabel)
EndIf ; End of fourth page...
ElIf iPageNumber == 5 then
; fifth page handling...
If GetWindowClass (GetParent (hWnd)) != WC_Panel then ; Advanced
settings...
If sClass == WC_RadioButton then
If GetPriorWindow (GetParent (GetParent (hWnd))) then
If GetPriorWindow (GetParent (hWnd)) then ; allow
calls from
Return (GetWindowTextEx (GetParent (GetParent
(hWnd)), FALSE, FALSE))
Else
Return (GetWindowTextEx (GetParent (hWnd), FALSE,
FALSE))
EndIf
Else ; definetely the second pair of radio-button groups...
If GetWindowClass (GetPriorWindow (GetParent (hWnd)))
== WC_ScrollBox then
let sLabel = GetWindowTextEx (GetParent (GetParent
(hWnd)), FALSE, FALSE)
let sLabel = StringLeft (sLabel, StringContains
(sLabel, SC_Dots) + 2)
Return (sLabel)
ElIf GetWindowClass (GetNextWindow (GetParent (hWnd)))
== WC_ScrollBox then
let sLabel = GetWindowTextEx (GetParent (GetParent
(hWnd)), FALSE, FALSE)
let sLabel = StringChopLeft (sLabel, StringContains
(sLabel, SC_Dots) + 3)
let sLabel = StringLeft (sLabel, StringContains
(sLabel, SC_Dots) + 2)
Return (sLabel)
Else
let sLabel = GetWindowTextEx (GetParent (GetParent
(hWnd)), FALSE, FALSE)
let sLabel = StringChopLeft (sLabel, StringContains
(sLabel, SC_Dots) + 3)
let sLabel = StringChopLeft (sLabel, StringContains
(sLabel, SC_Dots) + 3)
let sLabel = StringLeft (sLabel, StringContains
(sLabel, SC_Dots) + 2)
Return (sLabel)
EndIf
EndIf
EndIf
EndIf
; Basic settings link handling...
If sClass == WC_Link
&& GetWindowClass (GetPriorWindow (hWnd)) == WC_Panel
&& GetWindowClass (GetNextWindow (hWnd)) == WC_Panel then
let hPage = FindWindow (hReal, WC_Page, WN_PrivacyBasicPage)
let sPageText = GetWindowText (hPage, FALSE)
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, GetWindowName (GetFirstChild (GetPriorWindow (hWnd)))))
let sLabel = stringChopLeft (sLabel, StringLength
(GetWindowName (GetFirstChild (GetPriorWindow (hWnd)))))
let sLabel = StringLeft (sLabel, StringContains (sLabel,
sObjName) - 2)
Return (sLabel)
EndIf ; End of handling of the fifth page...
ElIf iPageNumber == 6 then
; sixth page handling...
let hPage = FindWindow (hReal, WC_Page, WN_BlockedPage)
let sPageText = GetWindowText (hPage, FALSE)
If sClass == WC_Link then
let hTemp = FindWindow (hPage, WC_Button, cScNull)
If hTemp then
let sTemp = GetWindowName (hTemp)
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, sTemp))
let sLabel = stringChopLeft (sLabel, StringLength (sTemp))
let sLabel = StringLeft (sLabel, StringContains (sLabel,
sObjName) - 2)
Return (sLabel)
EndIf
EndIf ; sixth page finished...
ElIf iPageNumber == 7 then
; seventh page handling...
let hPage = FindWindow (hReal, WC_Page, WN_NotificationsPage)
let sPageText = GetWindowTextEx (hPage, FALSE, FALSE)
let sLabel = StringLeft (sPageText, StringContains (sPageText,
SC_Dots) + 3)
If sClass == WC_RadioButton then
Return (sLabel)
EndIf
If sClass == WC_Link then
If GetWindowClass (GetNextWindow (hWnd)) == WC_Panel then ;
Show Skype alert...
Return (sLabel)
ElIf GetWindowClass (GetNextWindow (hWnd)) == WC_Link
&& GetWindowClass (GetPriorWindow (hWnd)) == WC_Link then
Return (sLabel)
Else
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, SC_Dots) + 3)
Return (sLabel)
EndIf
EndIf
If sClass == WC_CheckBox
&& (GetWindowClass (GetPriorWindow (hWnd)) == WC_CheckBox
|| GetWindowClass (GetNextWindow (hWnd)) == WC_CheckBox) then
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, SC_Dots) + 3)
Return (sLabel)
EndIf ; Seventh page finished...
ElIf iPageNumber == 8 then
; eighth page handling...
let hPage = FindWindow (hReal, WC_Page, WN_AlertsPage)
let sPageText = GetWindowTextEx (hPage, FALSE, FALSE)
If GetWindowClass (GetParent (hWnd)) == WC_Page
&& GetWindowClass (GetPriorWindow (hWnd)) != WC_ScrollBox then
let sLabel = StringLeft (sPageText, StringContains (sPageText,
SC_Dots) + 3)
Say (sLabel, OT_CONTROL_GROUP_NAME)
ElIf GetWindowClass (GetParent (hWnd)) == WC_ScrollBox
|| GetWindowClass (GetPriorWindow (hWnd)) == WC_ScrollBox then
let sLabel = StringChopLeft (sPageText, StringContains
(sPageText, SC_Dots) + 3)
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf ; End of eighth page handling...
ElIf iPageNumber == 10 then
; tenth page handling...
If GetWindowClass (GetParent (hWnd)) != WC_Panel then ; Advanced
settings...
If sClass == WC_RadioButton then
If GetPriorWindow (GetParent (GetParent (hWnd))) then
If GetPriorWindow (GetParent (hWnd)) then ; allow
calls from
Say (GetWindowTextEx (GetParent (GetParent (hWnd)),
FALSE, FALSE), OT_CONTROL_GROUP_NAME)
Else
Say (GetWindowTextEx (GetParent (hWnd), FALSE,
FALSE), OT_CONTROL_GROUP_NAME)
EndIf
EndIf
EndIf
ElIf sClass == WC_RadioButton
|| sClass == WC_Link then
let sLabel = GetWindowTextEx (GetParent (hWnd), FALSE, FALSE)
let sLabel = stringLeft (sLabel, StringContains (sLabel,
SC_Dots) + 3)
Say (sLabel, OT_CONTROL_GROUP_NAME)
ElIf sClass == WC_Edit then
let sLabel = GetWindowTextEx (GetParent (hWnd), FALSE, FALSE)
let sLabel = stringChopLeft (sLabel, StringContains (sLabel,
SC_Dots) + 3)
SayObjectTypeAndText ()
Say (sLabel, OT_CONTROL_NAME)
Return (TRUE )
EndIf
ElIf iPageNumber == 11 then
; eleventh page handling...
If sClass == WC_Link
&& GetWindowClass (GetParent (hWnd)) == WC_Page
&& (! GetPriorWindow (hWnd)) then
let hPage = FindWindow (hReal, WC_Page, WN_CallForwardingPage)
let sLabel = GetWindowTextEx (hPage, FALSE, FALSE)
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf ; eleventh page finished...
ElIf iPageNumber == 12 then
; twelth page handling...
let hPage = FindWindow (hReal, WC_Page, WN_VoiceMailPage)
let sPageText = GetWindowText (hPage, FALSE)
If sClass == WC_CheckBox
&& (! GetNextWindow (hWnd)) then ; definetely the first 'Send
unanswered calls to Skype Voicemail' checkbox...
let sLabel = StringLeft (sPageText, StringContains (sPageText,
cScPeriod) - 1)
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf
If sClass == WC_Edit then
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, GetWindowName (GetLastWindow (hWnd))))
let sLabel = stringChopLeft (sLabel, StringLength
(GetWindowName (GetLastWindow (hWnd))))
let iTemp = StringContains (sLabel, SC_Dots) - 1
While iTemp
&& (StringCompare (SubString (sLabel, iTemp, 1), StringUpper
(SubString (sLabel, iTemp, 1)), TRUE)
|| StringIsBlank (SubString (sLabel, iTemp, 1)))
let iTemp = iTemp - 1
EndWhile
let sLabel = stringChopLeft (sLabel, iTemp - 1)
Say (StringLeft (sLabel, StringContains (sLabel, SC_Dots) + 3),
OT_CONTROL_GROUP_NAME)
let sLabel = stringChopLeft (sLabel, StringContains (sLabel,
SC_Dots) + 3)
let sTemp = StringChopLeft (sLabel, StringContains (sLabel,
sObjValue) + 3)
let sLabel = StringLeft (sLabel, StringContains (sLabel,
sObjValue) - 2)
Say (sLabel, OT_CONTROL_NAME)
SayObjectTypeAndText ()
Say (StringSegment (sTemp, cScSpace, 1), OT_CONTROL_NAME)
Return (TRUE)
EndIf
If sClass == WC_CheckBox
&& (GetWindowClass (GetNextWindow (hWnd)) == WC_Edit
|| GetWindowClass (GetNextWindow (GetNextWindow (hWnd))) ==
WC_Edit) then
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, GetWindowName (GetLastWindow (hWnd))))
let sLabel = stringChopLeft (sLabel, StringLength
(GetWindowName (GetLastWindow (hWnd))))
let iTemp = StringContains (sLabel, SC_Dots) - 1
While iTemp
&& (StringCompare (SubString (sLabel, iTemp, 1), StringUpper
(SubString (sLabel, iTemp, 1)), TRUE)
|| StringIsBlank (SubString (sLabel, iTemp, 1)))
let iTemp = iTemp - 1
EndWhile
let sLabel = stringChopLeft (sLabel, iTemp - 1)
Say (StringLeft (sLabel, StringContains (sLabel, SC_Dots) + 3),
OT_CONTROL_GROUP_NAME)
EndIf
If sClass == WC_Link then
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, cScPeriod) + 1)
While StringContainsChars (sLabel, cScPeriod)
let sLabel = stringChopLeft (sLabel, StringContains
(sLabel, cScPeriod) + 1)
EndWhile
let sLabel = StringLeft (sLabel, StringContains (sLabel,
sObjName) - 2)
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf ; twelth page finished...
ElIf iPageNumber == 14 then
; fourteenth page handling...
If sClass == WC_RadioButton then
If GetPriorWindow (GetParent (hWnd)) then
let sLabel = GetWindowTextEx (GetParent (GetParent (hWnd)),
FALSE, FALSE)
let sLabel = StringLeft (sLabel, StringContains (sLabel,
SC_Dots) + 3)
Say (sLabel, OT_CONTROL_GROUP_NAME)
Else
let sLabel = GetWindowTextEx (GetParent (GetParent (hWnd)),
FALSE, FALSE)
let sLabel = stringChopLeft (sLabel, StringContains
(sLabel, GetWindowName (FindWindow (hPage, WC_StandardEdit, cScNull))))
let sLabel = stringChopLeft (sLabel, StringLength
(GetWindowName (FindWindow (hPage, WC_StandardEdit, cScNull))))
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf
EndIf ; end of fourteenth page handling...
ElIf iPageNumber == 16 then
; sixteenth page handling...
let hPage = FindWindow (hReal, WC_Page, WN_SMSPage)
let sPageText = GetWindowTextEx (hPage, FALSE, FALSE)
If sClass == WC_RadioButton then
let sLabel = GetWindowTextEx (GetParent (hWnd), FALSE, FALSE)
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf
If sClass == WC_Link then
If GetParent (hWnd) == hPage
&& (! GetNextWindow (hWnd)) then
Say (sPageText, OT_CONTROL_GROUP_NAME)
EndIf
If Not GetPriorWindow (hWnd) then
IndicateControlType (iType, GetWindowText (hWnd, FALSE))
Return (TRUE)
EndIf
EndIf ; End of sixteenth page handling...
ElIf iPageNumber == 17 then
; seventeenth page handling...
let hPage = FindWindow (hReal, WC_Page, WN_UpdatesPage)
let sPageText = GetWindowTextEx (hPage, FALSE, FALSE)
If sClass == WC_CheckBox then
If (! GetNextWindow (hWnd))
&& (! GetPriorWindow (GetPriorWindow (hWnd))) then
let hTemp = GetParent (hWnd)
let sLabel = GetWindowText (hTemp, FALSE)
let sLabel = stringLeft (sLabel, StringContains (sLabel,
SC_Dots) + 3)
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf
If GetNextWindow (hWnd)
&& (! GetNextWindow (GetNextWindow (hWnd))) then
let hTemp = GetParent (hWnd)
let sLabel = GetWindowText (hTemp, FALSE)
let sLabel = stringLeft (sLabel, StringContains (sLabel,
SC_Dots) + 3)
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf
EndIf
If sClass == WC_Link then
Say (sPageText, OT_CONTROL_GROUP_NAME)
EndIf
ElIf iPageNumber == 18 then
; eighteenth page handling...
let hPage = FindWindow (hReal, WC_Page, WN_ConnectionPage)
let sPageText = GetWindowText (hPage, FALSE)
let sTemp = GetWindowTextEx (hPage, FALSE, FALSE)
If sClass == WC_NormalEdit then
If (! GetNextWindow (hWnd)) then
let sLabel = StringLeft (sPageText, StringContains
(sPageText, sObjValue) - 2)
;Say (sLabel, OT_CONTROL_NAME)
SayObjectTypeAndText ()
let sLabel = stringChopLeft (sTemp, StringLength (sLabel) + 1)
let sLabel = StringSplitOnLargeLetters (sLabel)
let sLabel = StringSegment (sLabel, LIST_ITEM_SEPARATOR, 1)
Say (sLabel, OT_CONTROL_NAME)
Return (TRUE)
EndIf
EndIf
If sClass == WC_Link then
let hCheckBox = FindWindow (hPage, WC_CheckBox, cScNull)
let sCheckBoxName = GetWindowName (hCheckBox)
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, sCheckBoxName))
let sLabel = stringChopLeft (sLabel, StringLength (sCheckBoxName))
let sLabel = StringLeft (sLabel, StringContains (sLabel,
sObjName) - 2)
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf
ElIf iPageNumber == 19 then
; nineteenth page handling...
If sClass == WC_Listbox then
;IndicateControlType (WT_LISTBOX, cScNull, GetLine ())
SayWindowTypeAndText (hWnd)
Return (TRUE)
EndIf ; end of nineteenth page handling...
EndIf
Return (cScNull)
EndFunction
*/
Int Function HandleCustomSkype4OptionsDialogue (Handle hWnd)
; This function is intended to handle all the issues located in the
options dialogue for Skype 4.xxx.
var
Int iType,
Int iChildID,
Int iTemp,
Int iOptionsItem,
Handle hRealWindow,
Handle hPageWindow,
Handle hTemp,
Handle hTreeViewWindow,
handle hParent,
handle hNext,
handle hPrior,
handle hFirst,
Object oTreeView,
String sWindowClass,
string sParentClass,
String sPageText,
String sLabel,
String sWindowName,
string sParentName,
String sSegment,
String sTemp,
String sObjectName,
String sObjectDescription,
String sObjectValue
let hRealWindow = GetRealWindow (hWnd)
let hTreeViewWindow = GetFirstChild (hRealWindow)
let oTreeView = GetObjectFromEvent (hTreeViewWindow, OBJID_CLIENT,
iChildID, iTemp)
let iOptionsItem = oTreeView.accSelection
let sWindowClass = GetWindowClass (hWnd)
let sWindowName = GetWindowName (hWnd)
let iType = GetWindowSubtypeCode (hWnd, TRUE)
If !iType then
let iType = GetObjectSubTypeCode (TRUE)
EndIf
let sObjectName = GetObjectName (TRUE)
let sObjectDescription = GetObjectDescription (TRUE)
let sObjectValue = GetObjectValue (TRUE)
If sWindowClass == WC_OptionsTreeView then
If StringCompare (sObjectName, oTreeView.accName
(iOptionsItem),TRUE) then
;check for second instances of treeview items
;kludge for ensuring that correct treeview item gains focus.
if iOptionsItem==12;Sounds
|| iOptionsItem==17 then ;Video
oTreeView.accSelect(SelFlag_TakeFocus+SelFlag_TakeSelection,(iOptionsItem-1))
NextLine()
else
oTreeView.accSelect(SelFlag_TakeFocus+SelFlag_TakeSelection,iOptionsItem)
endIf
let giSkype4FocusChanged = TRUE
Return TRUE
EndIf
If ! StringIsBlank (sObjectDescription) then
Say (sObjectName + cScColon + sObjectDescription, OT_line)
EndIf
Say (PositionInGroup (), OT_POSITION)
Return TRUE
EndIf
let hParent=GetParent(hwnd)
let hPrior=GetPriorWindow(hwnd)
let hNext=GetNextWindow(hwnd)
let hFirst=GetFirstWindow(hwnd)
let sParentClass=GetWindowClass(hParent)
let sParentName=GetWindowName (GetParent (hWnd))
If iOptionsItem == 2 then
; Handling of the general settings page...
let sPageText = GetWindowTextEx (FindWindow (hRealWindow, WC_Page,
WN_GeneralPage), FALSE, FALSE)
If sWindowClass == WC_RadioButton then
let sLabel = sParentName
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf
If sWindowClass == WC_Edit then
SayWindowTypeAndText (hWnd)
let sTemp = sParentName
StringTrimCommon (sWindowName, sTemp)
let sTemp = StringTrimLeadingBlanks (sTemp)
StringTrimCommon (sObjectValue, sTemp)
let gsBrlControlLabel = sTemp
Say (sTemp, OT_CONTROL_NAME)
Return TRUE
EndIf
; link handling on the first page...
If sWindowClass == WC_Link then
Say (sPageText, OT_CONTROL_GROUP_NAME)
EndIf ; End of first page handling...
let gsBrlStaticText=sPageText
ElIf iOptionsItem == 3 then
; Audio settings page handling...
let hPageWindow = FindWindow (hRealWindow, WC_Page, WN_AudioPage)
If hPageWindow then ; simple options page is present...
let sPageText = GetWindowTextEx (hPageWindow, FALSE, FALSE)
If sWindowClass == WC_Link then
let sTemp = GetWindowName (FindWindow (hPageWindow,
WC_ComboBox, cScNull))
If ! StringIsBlank (sTemp) then
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, sTemp) - 1)
StringTrimCommon (sLabel, sTemp)
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf
EndIf
EndIf ; Second page finished...
ElIf iOptionsItem == 4
|| iOptionsItem == 12 then
; sounds pages handling...
let hPageWindow = FindWindow (hRealWindow, WC_Page, WN_RingTonesPage)
let hTemp = GetNextWindow (GetFirstChild (hPageWindow))
let sTemp = GetWindowText (hTemp, FALSE)
let sTemp = StringSplitOnLargeLetters (sTemp)
If sWindowClass == WC_CheckabelListView then
let sTemp=StringSegment (sTemp, LIST_ITEM_SEPARATOR, 1)
let gsBrlControlLabel = sTemp
Say (sTemp, OT_CONTROL_NAME)
EndIf
If sWindowClass == WC_ComboBox then
let sTemp= StringSegment (sTemp, LIST_ITEM_SEPARATOR, 2)
let gsBrlControlLabel =sTemp
Say (sTemp,OT_CONTROL_NAME)
EndIf
If sWindowClass == WC_Listbox2 then
let sTemp = GetWindowTextEx (hParent, FALSE, FALSE, FALSE)
let sTemp = StringSplitOnLargeLetters (sTemp)
let sTemp=StringSegment (sTemp, LIST_ITEM_SEPARATOR, 2)
let gsBrlControlLabel = sTemp
Say (sTemp, OT_CONTROL_NAME)
EndIf ; end of third page handling...
ElIf iOptionsItem == 5
|| iOptionsItem == 17 then
; video settings page handling...
If sWindowClass == WC_RadioButton then
let sTemp=sParentName
let gsBrlControlLabel = sTemp
Say (sTemp,OT_CONTROL_GROUP_NAME)
EndIf
If sWindowClass == WC_Link then
If ! hPrior then
let sLabel = GetWindowText (hNext, FALSE)
EndIf
If ! hNext then
let sLabel = GetWindowText (hWnd, FALSE)
EndIf
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf ; End of fourth page...
ElIf iOptionsItem == 7 then
; privacy settings page handling...
let hPageWindow = FindWindow (hRealWindow, WC_Page,
WN_Skype4PrivacyBasicPage)
If IsWindowVisible (hPageWindow) then
If sWindowClass == WC_Link then
let sPageText = GetWindowTextEx (hPageWindow, FALSE, FALSE)
Say (sPageText, OT_CONTROL_GROUP_NAME)
EndIf
Else
If sWindowClass == WC_RadioButton then
let sTemp=sParentName
let gsBrlControlLabel = sTemp
Say (sTemp, OT_CONTROL_GROUP_NAME)
EndIf
EndIf
ElIf iOptionsItem == 8 then
; Dlocked contacts page handling...
let hPageWindow = FindWindow (hRealWindow, WC_Page, WN_BlockedPage)
let sPageText = GetWindowTextEx (hPageWindow, FALSE, FALSE)
If sParentClass== WC_ComboBox then
let sLabel = sPageText
StringTrimCommon (sLabel, GetWindowName (FindWindow
(hPageWindow, WC_Listbox2, cScNull)), TRUE)
let sTemp = StringSegment (sLabel, cScPeriod, -1)
StringTrimCommon (sLabel, sTemp)
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf
If sWindowClass == WC_Link then
let sLabel = sPageText
StringTrimCommon (sLabel, GetWindowName (FindWindow
(hPageWindow, WC_Listbox2, cScNull)), TRUE)
let sLabel = StringSegment (sLabel, cScPeriod, -1)
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf ; sixth page finished...
ElIf iOptionsItem == 10 then
; notifications settings page handling...
If sWindowClass == WC_CheckBox then
let sLabel = sParentName
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf ; Seventh page finished...
ElIf iOptionsItem == 11 then
; alerts and messages page handling...
If sParentClass == "TskGroupBox.UnicodeClass" then
Say (GetWindowTextEx (hParent, FALSE, FALSE),
OT_CONTROL_GROUP_NAME)
EndIf
ElIf iOptionsItem == 14 then
; call settings page handling...
If sWindowClass == WC_RadioButton then
let sTemp=sParentName
let gsBrlControlLabel = sTemp
Say (sTemp, OT_CONTROL_GROUP_NAME)
EndIf ; eleventh page finished...
ElIf iOptionsItem == 15 then
; call forwarding page handling...
If sWindowClass == WC_Edit then
let sLabel =sParentName
StringTrimCommon (sLabel, sWindowName)
let sLabel = StringTrimLeadingBlanks (sLabel)
StringTrimCommon (sLabel, sObjectValue)
let gsBrlControlLabel = sLabel
SayWindowTypeAndText (hWnd)
Say (sLabel, OT_CONTROL_NAME)
Return TRUE
EndIf
let sLabel = GetWindowTextEx (hParent, FALSE, FALSE)
if !StringIsBlank(sLabel) then
StringTrimCommon(sLabel,sObjectName)
say(sLabel,ot_line,true)
else
let sLabel=GetWindowTextEx (hWnd, FALSE,true)
if sLabel!=sObjectName then
stringTrimCommon(sLabel,sObjectName)
let iTemp=StringContains(sLabel,cscPeriod)
if iTemp>0 then
let sLabel=stringLeft(sLabel,iTemp+1)
endIf
if iType==wt_link then
Say (sLabel, OT_CONTROL_GROUP_NAME)
endIf
endIf
EndIf ; fifteenth page finished...
let gsBrlStaticText=sLabel
ElIf iOptionsItem == 16 then
; voice mail page handling...
let hPageWindow=FindWindow (hRealWindow, WC_Page, WN_VoiceMailPage)
let sPageText = GetWindowTextEx (hPageWindow, FALSE, FALSE)
If sWindowClass == WC_CheckBox then
If ! hNext then
Say (StringSegment (sPageText, cScPeriod, 1),
OT_CONTROL_GROUP_NAME)
Return FALSE
EndIf
let sLabel = GetWindowName (hFirst)
let sSegment = GetWindowName (GetFirstChild (hFirst))
let sLabel = stringLeft (sLabel, StringContains (sLabel,
sSegment) - 1)
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf
If sWindowClass == WC_Edit then
let sLabel = sParentName
let sTemp = sLabel
let sLabel = StringLeft (sLabel, StringContains (sLabel,
sWindowName) - 1)
Say (sLabel, OT_CONTROL_GROUP_NAME)
StringTrimCommon (sLabel, sTemp)
StringTrimCommon (sTemp, sWindowName)
let sTemp = StringTrimLeadingBlanks (sTemp)
StringTrimCommon (sTemp, sObjectValue)
SayWindowTypeAndText (hWnd)
let gsBrlControlLabel = sTemp
Say (sTemp, OT_CONTROL_GROUP_NAME)
Return TRUE
EndIf
If sWindowClass == WC_Link then
if !hPrior then
let sTemp= GetWindowTextEx(hParent,false,true)
let sTemp= StringLeft (sTemp, StringContains
(sTemp,sObjectName) - 1)
let gsBrlControlLabel =sTemp
Say (sTemp, OT_screen_message)
endIf
Say (StringSegment (StringSplitOnLargeLetters (StringSegment
(sPageText, cScPeriod, -1)), LIST_ITEM_SEPARATOR, -1),
OT_CONTROL_GROUP_NAME)
EndIf ; end of fourteenth page handling...
ElIf iOptionsItem == 19 then
; IM settings page handling...
If sWindowClass == WC_RadioButton then
let sTemp=sParentName
let gsBrlControlLabel = sTemp
Say (sTemp, OT_CONTROL_GROUP_NAME)
EndIf ; End of sixteenth page handling...
ElIf iOptionsItem == 20 then
; IM appearance page handling...
let sPageText = GetWindowTextEx (FindWindow (hRealWindow, WC_Page,
WN_ChatAppearancePage), FALSE, FALSE)
If iType == WT_BUTTON
&& sParentClass == WC_Page then
Say (sPageText, OT_CONTROL_GROUP_NAME)
EndIf ; End of seventeenth page handling...
ElIf iOptionsItem == 21 then
; SMS settings page handling...
let sPageText = GetWindowTextEx (FindWindow (hRealWindow, WC_Page,
WN_SMSPage), FALSE, FALSE)
If sWindowClass == WC_RadioButton then
let sTemp=sParentName
let gsBrlControlLabel = sTemp
Say (sTemp, OT_CONTROL_GROUP_NAME)
EndIf
If sWindowClass == WC_LINK then
If sParentClass != WC_Page then
IndicateControlType (iType, GetWindowTextEx (hWnd, FALSE,
FALSE))
Return TRUE
Else
Say (sPageText, OT_CONTROL_GROUP_NAME)
EndIf
EndIf ; eighteenth page finished...
ElIf iOptionsItem == 23 then
; Advanced settings page handling...
let sPageText = GetWindowTextEx (FindWindow (hRealWindow, WC_Page,
WN_UpdatesPage), FALSE, FALSE)
If sWindowClass == WC_CheckBox then
Say (sParentName, OT_CONTROL_GROUP_NAME)
EndIf
If sWindowClass == WC_Link then
Say (sPageText, OT_CONTROL_GROUP_NAME)
EndIf ; end of nineteenth page handling...
let gsBrlStaticText=sParentName
ElIf iOptionsItem == 24 then
; Connection page handling...
let sPageText = GetWindowTextEx (FindWindow (hRealWindow, WC_Page,
WN_ConnectionPage), FALSE, FALSE)
If sWindowClass == WC_AccessibleEdit then
let sLabel = sObjectName
StringTrimCommon (sLabel, sWindowName)
let sLabel = StringTrimLeadingBlanks (sLabel)
StringTrimCommon (sLabel, sObjectValue)
SayWindowTypeAndText (hWnd)
Say (sLabel, OT_CONTROL_NAME)
let gsBrlControlLabel = sLabel
Return TRUE
EndIf
If sWindowClass == WC_Link then
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, GetWindowName (GetNextWindow (hWnd))) - 1)
StringTrimCommon (sLabel, GetWindowName (GetNextWindow (hWnd)))
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf
ElIf iOptionsItem == 25 then
; Hotkeys page handling...
If sWindowClass == WC_AccessibleCheckableListbox then
let sTemp = StringSegment (sObjectName, SC_Comma + cScColon, 2)
+ cScSpace + StringSegment (sObjectName, SC_Comma + cScColon, 4)
IndicateControlType (WT_LISTBOX, cScNull, sTemp)
IndicateControlState (WT_LISTBOX, GetControlAttributes ()& 1)
Return TRUE
EndIf
EndIf
if gsBrlControlLabel==cscNull then
let gsBrlControlLabel = sLabel
endIf
Return FALSE
EndFunction
Int Function HandleCustomOptionsDialogue (Handle hWnd)
; This function processes all the issues located in the options dialogue
of Skype prior to version 4.xxx.
var
Int iType,
Int iChildID,
Int iTemp,
Handle hReal,
Handle hPage,
handle hNext,
handle hPrior,
handle hParent,
handle hLast,
Handle hRadioButton,
Handle hCheckBox,
Handle hComboBox,
Handle hTemp,
Handle hTreeView,
Object oTreeView,
int iTreeviewItem,
String sClass,
string sNextClass,
string sPriorClass,
string sParentClass,
String sRadioButtonName,
String sCheckBoxName,
String sComboBoxName,
String sPageText,
String sLabel,
String sWinName,
String sSegment,
String sTemp,
String sObjName,
String sObjDescription,
String sObjValue,
String sHelpMsg
let iType = GetWindowSubtypeCode (hWnd, TRUE)
If ! iType then
let iType = GetObjectSubTypeCode (TRUE)
EndIf
let sObjName = GetObjectName (TRUE)
let sObjDescription = GetObjectDescription (TRUE)
let sObjValue = GetObjectValue (TRUE)
let sClass = GetWindowClass (hWnd)
If sClass == WC_OptionsTreeView then
IndicateControlType (iType, GetObjectName (TRUE, 1), sObjName)
Say (PositionInGroup (), OT_POSITION)
If ! StringIsBlank (sObjDescription) then
Say (sObjName + cScColon + sObjDescription, OT_line)
EndIf
Return TRUE
EndIf
let hReal = GetRealWindow (hWnd)
let hTreeView = GetFirstChild (hReal)
let oTreeView = GetObjectFromEvent (hTreeview, OBJID_CLIENT, iChildID,
iTemp)
let iTreeviewItem=oTreeview.accSelection
let sWinName = GetWindowName (hWnd)
let hParent=GetParent(hwnd)
let sParentClass=GetWindowClass(hParent)
let hNext=GetNextWindow(hwnd)
let sNextClass=GetWindowClass(hNext)
let hPrior=GetPriorWindow(hwnd)
let sPriorClass=GetWindowClass(hPrior)
let hLast=GetLastWindow(hwnd)
If iTreeviewItem == 1 then
; Handling of the first page...
let hPage = FindWindow (hReal, WC_Page, WN_GeneralPage)
let sPageText = GetWindowTextEx (hPage, FALSE, FALSE)
If sClass == WC_RadioButton then
let hTemp = hLast
If hTemp then
let sTemp = GetWindowName (hTemp)
let sLabel = StringLeft (sPageText, StringContains
(sPageText, sTemp) - 2)
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf
EndIf
If sClass == WC_Edit then
SayWindowTypeAndText (hWnd)
If ! hNext then; the 'away' edit box...
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, sWinName) + StringLength (sWinName))
let sLabel = StringLeft (sLabel, StringContains (sLabel,
GetWindowName (hPrior)) - 2)
Say (sLabel, OT_CONTROL_NAME)
Else ; the 'not availabel' edit box...
let hComboBox = FindWindow (hPage, WC_ComboBox, cScNull)
If hComboBox then
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, sWinName) + StringLength (sWinName))
let sComboBoxName = GetWindowName (hComboBox)
let sLabel = StringLeft (sLabel, StringContains
(sLabel, sComboBoxName) - 2)
Say (sLabel, OT_CONTROL_NAME)
EndIf
EndIf
let gsBrlControlLabel=sLabel
Return TRUE
EndIf
; link handling on the first page...
If sClass == WC_Link then
let hComboBox = FindWindow (hPage, WC_ComboBox, cScNull)
If hComboBox then
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, sWinName) + StringLength (sWinName))
let sComboBoxName = GetWindowName (hComboBox)
let sLabel = StringChopLeft (sLabel, StringContains
(sLabel, sComboBoxName) + StringLength (sComboBoxName))
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf
EndIf ; End of first page handling...
ElIf iTreeviewItem == 2then
; second page handling...
let hPage = FindWindow (hReal, WC_Page, WN_AudioPage)
let sPageText = GetWindowTextEx (hPage, FALSE, FALSE)
If sClass == WC_Link
&& (sPriorClass == WC_Link
|| ! GetPriorWindow (GetPriorWindow (hPrior))) then
let hComboBox = FindWindow (hPage, WC_ComboBox, cScNull)
If hComboBox then
let sComboBoxName = GetWindowName (hComboBox)
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, sComboBoxName) + StringLength (sComboBoxName))
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf
EndIf
;check for gray-edout status of left-right slider
if iType==WT_LEFTRIGHTSLIDER then
let hTemp=FindWindow(hPage,WC_CheckBox )
if hTemp
&& getNextWindow(getNextWindow((hNext)))==hTemp then ;we are on
the slider that can be grayed out.
;determine whether hTemp is checked.
SaveCursor()
InvisibleCursor()
MoveToWindow(hTemp)
if getObjectState()==cmsg_checked then ; the slider is
grayed out.
sayMessage(ot_item_state,cmsgGrayedGraphic1_L)
let gsBrlState=cmsgGrayedGraphic1_L
endIf
restoreCursor()
pcCursor()
endIf
endIf
; Second page finished...
ElIf iTreeviewItem == 3
|| iTreeviewItem == 9 then
; third and ninth pages handling...
let hPage = FindWindow (hReal, WC_Page, WN_RingTonesPage)
let hTemp = GetNextWindow (GetFirstChild (hPage))
let sTemp = GetWindowText (hTemp, FALSE)
let sTemp = StringSplitOnLargeLetters (sTemp)
If sClass == WC_CheckableListbox then
Say (StringSegment (sTemp, LIST_ITEM_SEPARATOR, 1),
OT_CONTROL_NAME)
EndIf
If sClass == WC_ComboBox then
Say (StringSegment (sTemp, LIST_ITEM_SEPARATOR, 2),
OT_CONTROL_NAME)
EndIf ; end of third page handling...
ElIf iTreeviewItem == 4
|| iTreeviewItem == 13 then
; fourth and thirteenth page handling...
let hPage = FindWindow (hReal, WC_Page, WN_VideoPage)
let sPageText = GetWindowTextEx (hPage, FALSE, FALSE)
If sClass == WC_Panner then
IndicateControlType (iType, GetWindowText (hWnd, FALSE))
Return TRUE
EndIf
If sClass == WC_RadioButton then
If GetWindowClass (GetPriorWindow (hParent)) == WC_ScrollBox then
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, cScColon) + 1)
let sLabel = StringLeft (sLabel, StringContains (sLabel,
SC_Dots) + 2)
Say (sLabel, OT_CONTROL_GROUP_NAME)
Else
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, SC_Dots) + 3)
let sLabel = StringLeft (sLabel, StringContains (sLabel,
SC_Dots) + 2)
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf
EndIf
If sClass == WC_Link then
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, SC_Dots) + 3)
let sLabel = stringChopLeft (sLabel, StringContains (sLabel,
SC_Dots) + 3)
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf ; End of fourth page...
ElIf iTreeviewItem == 5 then
; fifth page handling...
If sParentClass != WC_Panel then ; Advanced settings...
If sClass == WC_RadioButton then
If GetPriorWindow (GetParent (hParent)) then
If GetPriorWindow (hParent) then ; allow calls from
Say (GetWindowTextEx (GetParent (hParent), FALSE,
FALSE), OT_CONTROL_GROUP_NAME)
Else
Say (GetWindowTextEx (hParent, FALSE, FALSE),
OT_CONTROL_GROUP_NAME)
EndIf
Else ; definetely the second pair of radio-button groups...
If GetWindowClass (GetPriorWindow (hParent)) ==
WC_ScrollBox then
let sLabel = GetWindowTextEx (GetParent (hParent),
FALSE, FALSE)
let sLabel = StringLeft (sLabel, StringContains
(sLabel, SC_Dots) + 2)
Say (sLabel, OT_CONTROL_GROUP_NAME)
ElIf GetWindowClass (GetNextWindow (hParent)) ==
WC_ScrollBox then
let sLabel = GetWindowTextEx (GetParent (hParent),
FALSE, FALSE)
let sLabel = StringChopLeft (sLabel, StringContains
(sLabel, SC_Dots) + 3)
let sLabel = StringLeft (sLabel, StringContains
(sLabel, SC_Dots) + 2)
Say (sLabel, OT_CONTROL_GROUP_NAME)
Else
let sLabel = GetWindowTextEx (GetParent (hParent),
FALSE, FALSE)
let sLabel = StringChopLeft (sLabel, StringContains
(sLabel, SC_Dots) + 3)
let sLabel = StringChopLeft (sLabel, StringContains
(sLabel, SC_Dots) + 3)
let sLabel = StringLeft (sLabel, StringContains
(sLabel, SC_Dots) + 2)
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf
EndIf
EndIf
EndIf
; Basic settings link handling...
If sClass == WC_Link
&& sPriorClass == WC_Panel
&& sNextClass == WC_Panel then
let hPage = FindWindow (hReal, WC_Page, WN_PrivacyBasicPage)
let sPageText = GetWindowText (hPage, FALSE)
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, GetWindowName (GetFirstChild (GetPriorWindow (hWnd)))))
let sLabel = stringChopLeft (sLabel, StringLength
(GetWindowName (GetFirstChild (GetPriorWindow (hWnd)))))
let sLabel = StringLeft (sLabel, StringContains (sLabel,
sObjName) - 2)
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf ; End of handling of the fifth page...
ElIf iTreeviewItem == 6 then
; sixth page handling...
let hPage = FindWindow (hReal, WC_Page, WN_BlockedPage)
let sPageText = GetWindowText (hPage, FALSE)
If sClass == WC_Listbox2 then
let sLabel = stringLeft (sPageText, StringContains (sPageText,
GetWindowText (hWnd, FALSE)) - 2)
Say (sLabel, OT_CONTROL_NAME)
EndIf
If sClass == WC_StandardEdit then
let hTemp = GetFirstChild (hPage)
let hTemp = GetLastWindow (hTemp)
let hTemp = GetPriorWindow (hTemp)
If hTemp then
let sTemp = GetWindowName (hTemp)
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, sTemp))
let sLabel = stringChopLeft (sLabel, StringLength (sTemp))
If ! StringIsBlank (sObjValue) then
let sLabel = StringLeft (sLabel, StringContains
(sLabel, sObjValue) - 2)
Else ; no phone number is entered...
let sTemp = GetWindowName (FindWindow (hPage,
WC_Button, cScNull))
let sLabel = StringLeft (sLabel, StringContains
(sLabel, sTemp) - 2)
EndIf
let gsBrlControlLabel=sLabel
IndicateControlType (iType, sLabel, sObjValue)
Return TRUE
EndIf
EndIf
If sClass == WC_Link then
let hTemp = FindWindow (hPage, WC_Button, cScNull)
If hTemp then
let sTemp = GetWindowName (hTemp)
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, sTemp))
let sLabel = stringChopLeft (sLabel, StringLength (sTemp))
let sLabel = StringLeft (sLabel, StringContains (sLabel,
sObjName) - 2)
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf
EndIf ; sixth page finished...
ElIf iTreeviewItem == 7 then
; seventh page handling...
let hPage = FindWindow (hReal, WC_Page, WN_NotificationsPage)
let sPageText = GetWindowTextEx (hPage, FALSE, FALSE)
let sLabel = StringLeft (sPageText, StringContains (sPageText,
SC_Dots) + 3)
If sClass == WC_RadioButton then
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf
If sClass == WC_Link then
If sNextClass == WC_Panel then ; Show Skype alert...
Say (sLabel, OT_CONTROL_GROUP_NAME)
Say (GetWindowName (GetNextWindow (FindWindow (hPage,
WC_RadioButton, cScNull))), OT_CONTROL_GROUP_NAME)
ElIf sNextClass == WC_Link
&& sPriorClass == WC_Link then
Say (sLabel, OT_CONTROL_GROUP_NAME)
Say (GetWindowName ((FindWindow (hPage, WC_RadioButton,
cScNull))), OT_CONTROL_GROUP_NAME)
Else
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, SC_Dots) + 3)
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf
EndIf
If sClass == WC_CheckBox
&& (sPriorClass == WC_CheckBox
|| sNextClass == WC_CheckBox) then
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, SC_Dots) + 3)
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf ; Seventh page finished...
ElIf iTreeViewItem== 8 then
; eighth page handling...
let hPage = FindWindow (hReal, WC_Page, WN_AlertsPage)
let sPageText = GetWindowTextEx (hPage, FALSE, FALSE)
If sParentClass == WC_Page
&& sPriorClass != WC_ScrollBox then
let sLabel = StringLeft (sPageText, StringContains (sPageText,
SC_Dots) + 3)
Say (sLabel, OT_CONTROL_GROUP_NAME)
ElIf sParentClass == WC_ScrollBox
|| sPriorClass == WC_ScrollBox then
let sLabel = StringChopLeft (sPageText, StringContains
(sPageText, SC_Dots) + 3)
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf ; End of eighth page handling...
ElIf iTreeviewItem == 10 then
; tenth page handling...
If sParentClass!= WC_Panel then ; Advanced settings...
If sClass == WC_RadioButton then
If GetPriorWindow (GetParent (hParent)) then
If GetPriorWindow (hParent) then ; allow calls from
Say (GetWindowTextEx (GetParent (hParent), FALSE,
FALSE), OT_CONTROL_GROUP_NAME)
Else
Say (GetWindowTextEx (hParent, FALSE, FALSE),
OT_CONTROL_GROUP_NAME)
EndIf
EndIf
EndIf
ElIf sClass == WC_RadioButton
|| sClass == WC_Link then
let sLabel = GetWindowTextEx (hParent, FALSE, FALSE)
let sLabel = stringLeft (sLabel, StringContains (sLabel,
SC_Dots) + 3)
Say (sLabel, OT_CONTROL_GROUP_NAME)
ElIf sClass == WC_Edit then
let sLabel = GetWindowTextEx (hParent, FALSE, FALSE)
let sLabel = stringChopLeft (sLabel, StringContains (sLabel,
SC_Dots) + 3)
SayObjectTypeAndText ()
Say (sLabel, OT_CONTROL_NAME)
let gsBrlControlLabel=sLabel
Return TRUE
EndIf
ElIf iTreeviewItem == 11 then
; eleventh page handling...
If sClass == WC_Link
&& sParentClass == WC_Page
&& ! hPrior then
let hPage = FindWindow (hReal, WC_Page, WN_CallForwardingPage)
let sLabel = GetWindowTextEx (hPage, FALSE, FALSE)
Say (sLabel, OT_CONTROL_GROUP_NAME)
else
if hLast==hwnd
&& iType==wt_link then
let sHelpMsg=GetWindowTextEx(hLast,false,true)
let gsBrlStaticText=sHelpMsg
SayMessage(ot_smart_help,sHelpMsg)
endIf
EndIf ; eleventh page finished...
ElIf iTreeviewItem == 12 then
; twelth page handling...
let hPage = FindWindow (hReal, WC_Page, WN_VoiceMailPage)
let sPageText = GetWindowText (hPage, FALSE)
If sClass == WC_CheckBox
&& ! hNext then ; definetely the first 'Send unanswered calls to
Skype Voicemail' checkbox...
let sLabel = StringLeft (sPageText, StringContains (sPageText,
cScPeriod) - 1)
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf
If sClass == WC_Edit then
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, GetWindowName (GetLastWindow (hWnd))))
let sLabel = stringChopLeft (sLabel, StringLength
(GetWindowName (GetLastWindow (hWnd))))
let iTemp = StringContains (sLabel, SC_Dots) - 1
While iTemp
&& (StringCompare (SubString (sLabel, iTemp, 1), StringUpper
(SubString (sLabel, iTemp, 1)), TRUE)
|| StringIsBlank (SubString (sLabel, iTemp, 1)))
let iTemp = iTemp - 1
EndWhile
let sLabel = stringChopLeft (sLabel, iTemp - 1)
Say (StringLeft (sLabel, StringContains (sLabel, SC_Dots) + 3),
OT_CONTROL_GROUP_NAME)
let sLabel = stringChopLeft (sLabel, StringContains (sLabel,
SC_Dots) + 3)
let sTemp = StringChopLeft (sLabel, StringContains (sLabel,
sObjValue) + 3)
let sLabel = StringLeft (sLabel, StringContains (sLabel,
sObjValue) - 2)
Say (sLabel, OT_CONTROL_NAME)
SayObjectTypeAndText ()
Say (StringSegment (sTemp, cScSpace, 1), OT_CONTROL_NAME)
let gsBrlControlLabel=sLabel
Return TRUE
EndIf
If sClass == WC_CheckBox
&& (sNextClass == WC_Edit
|| GetWindowClass (GetNextWindow (hNext)) == WC_Edit) then
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, GetWindowName (GetLastWindow (hWnd))))
let sLabel = stringChopLeft (sLabel, StringLength
(GetWindowName (GetLastWindow (hWnd))))
let iTemp = StringContains (sLabel, SC_Dots) - 1
While iTemp
&& (StringCompare (SubString (sLabel, iTemp, 1), StringUpper
(SubString (sLabel, iTemp, 1)), TRUE)
|| StringIsBlank (SubString (sLabel, iTemp, 1)))
let iTemp = iTemp - 1
EndWhile
let sLabel = stringChopLeft (sLabel, iTemp - 1)
Say (StringLeft (sLabel, StringContains (sLabel, SC_Dots) + 3),
OT_CONTROL_GROUP_NAME)
EndIf
If sClass == WC_Link then
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, cScPeriod) + 1)
While StringContainsChars (sLabel, cScPeriod)
let sLabel = stringChopLeft (sLabel, StringContains
(sLabel, cScPeriod) + 1)
EndWhile
let sLabel = StringLeft (sLabel, StringContains (sLabel,
sObjName) - 2)
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf
if !GetNextWindow(hNext)
&& iType==wt_link then
let sTemp=GetWindowTextEx(GetParent(hwnd),false,true)
let sHelpMsg=StringLeft(sTemp,StringContains(sTemp,sObjName)-1)
let gsBrlStaticText=sHelpMsg
sayMessage(ot_smart_help,sHelpMsg)
endIf
; twelth page finished...
ElIf iTreeviewItem == 14 then
; fourteenth page handling...
let hPage = FindWindow (hReal, WC_Page,WN_ChatSettings)
If sClass == WC_RadioButton then
If GetPriorWindow (hParent) then
let sLabel = GetWindowTextEx (GetParent (hParent), FALSE,
FALSE)
let sLabel = StringLeft (sLabel, StringContains (sLabel,
SC_Dots) + 3)
Say (sLabel, OT_CONTROL_GROUP_NAME)
Else
let sLabel = GetWindowTextEx (GetParent (hParent), FALSE,
FALSE)
let sLabel = stringChopLeft (sLabel, StringContains
(sLabel, GetWindowName (FindWindow (hPage, WC_StandardEdit, cScNull))))
let sLabel = stringChopLeft (sLabel, StringLength
(GetWindowName (FindWindow (hPage, WC_StandardEdit, cScNull))))
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf
EndIf ; end of fourteenth page handling...
ElIf iTreeviewItem == 15 then
; fifteenth page handling...
let hPage = FindWindow (hReal, WC_Page,WN_ChatAppearancePage)
if sClass==wc_ChatAppearanceListboxControl then
let hTemp=GetParent(hPrior)
let sLabel=GetWindowTextEx(hTemp,false,true)
IndicateControlType(iType,sLabel)
let gsBrlControlLabel=sLabel
return true
endIf
ElIf iTreeviewItem == 16 then
; sixteenth page handling...
let hPage = FindWindow (hReal, WC_Page, WN_SMSPage)
let sPageText = GetWindowTextEx (hPage, FALSE, FALSE)
If sClass == WC_RadioButton then
let sLabel = GetWindowTextEx (GetParent (hWnd), FALSE, FALSE)
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf
If sClass == WC_Link then
If hParent == hPage
&& ! hNext then
Say (sPageText, OT_CONTROL_GROUP_NAME)
EndIf
If ! hPrior then
IndicateControlType (iType, GetWindowText (hWnd, FALSE))
Return TRUE
EndIf
EndIf ; End of sixteenth page handling...
ElIf iTreeviewItem == 17 then
; seventeenth page handling...
let hPage = FindWindow (hReal, WC_Page, WN_UpdatesPage)
let sPageText = GetWindowTextEx (hPage, FALSE, FALSE)
If sClass == WC_CheckBox then
If ! hNext
&& ! GetPriorWindow (hPrior) then
let hTemp = hParent
let sLabel = GetWindowText (hTemp, FALSE)
let
sHelpMsg=stringChopLeft(sLabel,stringContains(sLabel,sc_dots)+3+stringLength(sObjName))
let
sHelpMsg=StringChopLeft(sHelpMsg,StringContains(sHelpMsg,sc_RightParen))
let gsBrlStaticText=sHelpMsg
let sLabel = stringLeft (sLabel, StringContains (sLabel,
SC_Dots) + 3)
Say (sLabel, OT_CONTROL_GROUP_NAME)
sayMessage(ot_smart_help,sHelpMsg)
EndIf
If hNext
&& ! GetNextWindow (hNext) then
let hTemp = hParent
let sLabel = GetWindowText (hTemp, FALSE)
let
sHelpMsg=stringChopLeft(sLabel,stringContains(sLabel,sc_dots)+3+stringLength(sObjName))
let
sHelpMsg=StringChopLeft(sHelpMsg,StringContains(sHelpMsg,sc_RightParen))
let gsBrlStaticText=sHelpMsg
let sLabel = stringLeft (sLabel, StringContains (sLabel,
SC_Dots) + 3)
Say (sLabel, OT_CONTROL_GROUP_NAME)
sayMessage(ot_smart_help,sHelpMsg)
EndIf
EndIf
If sClass == WC_Link then
Say (sPageText, OT_CONTROL_GROUP_NAME)
EndIf
ElIf iTreeviewItem == 18 then
; eighteenth page handling...
let hPage = FindWindow (hReal, WC_Page, WN_ConnectionPage)
let sPageText = GetWindowText (hPage, FALSE)
let sTemp = GetWindowTextEx (hPage, FALSE, FALSE)
If sClass == WC_NormalEdit then
If ! hNext then
let sLabel = StringLeft (sPageText, StringContains
(sPageText, sObjValue) - 2)
SayObjectTypeAndText ()
let sLabel = stringChopLeft (sTemp, StringLength (sLabel) + 1)
let sLabel = StringSplitOnLargeLetters (sLabel)
let sLabel = StringSegment (sLabel, LIST_ITEM_SEPARATOR, 1)
Say (sLabel, OT_CONTROL_NAME)
let gsBrlControlLabel=sLabel
Return TRUE
EndIf
EndIf
If sClass == WC_Link then
let hCheckBox = FindWindow (hPage, WC_CheckBox, cScNull)
let sCheckBoxName = GetWindowName (hCheckBox)
let sLabel = stringChopLeft (sPageText, StringContains
(sPageText, sCheckBoxName))
let sLabel = stringChopLeft (sLabel, StringLength (sCheckBoxName))
let sLabel = StringLeft (sLabel, StringContains (sLabel,
sObjName) - 2)
Say (sLabel, OT_CONTROL_GROUP_NAME)
EndIf
ElIf iTreeviewItem == 19 then
; nineteenth page handling...
If sClass == WC_Listbox then
SayWindowTypeAndText (hWnd)
SayCheckableListboxItemState()
Return TRUE
EndIf ; end of nineteenth page handling...
EndIf
let gsBrlControlLabel=sLabel
Return FALSE
EndFunction
int Function HandleCustomWindows (handle hWnd)
var
object UIA,
String sRealClass = GetWindowClass (GetRealWindow (hWnd)),
String sClass = GetWindowClass (hWnd),
string sHistoryItem = GetChatHistoryItemName (hwnd),
Int iOption,
int iObjectType
GlobalTutorSuppress = FALSE
if ! StringIsBlank (sHistoryItem) then
IndicateControlType (WT_LISTBOX, GetObjectName (TRUE, 1), sHistoryItem)
return TRUE
endIf
if getWindowClass (hwnd) == wc_ScreenSharing
&& getObjectSubtypeCode (TRUE) == WT_LISTBOX then
UIA = GetUIAObjectTree (hwnd)
if UIA then
UIA = UIA.FirstChild
endIf
if UIA && ! StringIsBlank (UIA.Name) then
SayControlEXWithMarkup (hwnd, "", "", "", "", "", UIA.Name)
return TRUE
EndIf
endIf
if getWindowClass (hwnd) != wc_dialog_pages_tree && getWindowClass
(GlobalPrevFocus) == wc_dialog_pages_tree then
indicateControlType (WT_DIALOG_PAGE, getDialogPageName ())
;manages where user has cycled to new page and now moved.
endIf
If sRealClass == WC_OptionsDialogue then ;prior to Skype 4 and above
let iObjectType=GetObjectSubtypeCode(true)
if HandleCustomOptionsDialogue (hWnd) then
Return TRUE
ElIf iObjectType==wt_comboBox then
if hwnd!=globalPrevFocus then
if IsWinVista() then
IndicateControlType(iObjectType,GetObjectName(),GetObjectValue())
else
IndicateControlType(iObjectType,GetObjectName(),GetWindowText(hwnd,true))
endIf
endIf
return true ;prevent extra chatter from other windows.
endIf
if sClass==WC_Panner
&& iObjectType==wt_link then
Say(msgHideHelpWindow,ot_line) ; do not return here so that
link itself may be announced properly by default call to
HandleCustomWindows.
endIf
ElIf sRealClass == WC_Skype4OptionsDialogue
&& HandleCustomSkype4OptionsDialogue (hWnd) then
Return TRUE
EndIf
;prevent extra chatter when the contact list does not actually have focus.
if (globalPrevReal==globalPrevReal
&& !globalPrevFocus)
&& (sClass==wc_contactList
|| sClass==WC_Skype4ContactList) then
return true
EndIf
If sClass == WC_Skype4ContactList
|| sClass == WC_ConversationList
|| sClass == WC_HistoryList then
; To avoid annoying 'Not Selected' announcement before each element...
let iOption = GetJCFOption (OPT_INDICATE_SELECTED)
SetJCFOption (OPT_INDICATE_SELECTED, 1)
IndicateControlType (GetWindowSubtypeCode (hWnd), GetObjectName
(TRUE, 1), GetObjectName (TRUE))
Say (PositionInGroup (), OT_POSITION)
SetJCFOption (OPT_INDICATE_SELECTED, iOption)
Return TRUE
EndIf
if sClass==wc_OptionTabCaption then ;control does nothing, so bypass.
SetFocus(GetPriorWindow(GetPriorWindow(hwnd)))
return true
endIf
; to avoid announcing the whole edit control you are typing messages in.
If sClass == WC_ChatEditWindowSkype5
&& GetWindowClass (GlobalPrevFocus) == WC_ChatEditWindowSkype5
GlobalTutorSuppress = TRUE
Return (TRUE)
EndIf
Return HandleCustomWindows (hWnd)
EndFunction
void function FocusChangedEventEx (handle hwndFocus, int nObject, int
nChild, handle hwndPrevFocus, int nPrevObject, int nPrevChild, int
nChangeDepth)
;Always null so conversation will announce who's typing unless you hit
Send from chat entry:
gbEnterInChatField = FALSE
let globalPrevFocus=hwndPrevFocus
let globalPrevReal=GetRealWindow(hwndPrevFocus)
let gsBrlStaticText=cscNull
let gsBrlState=cscNull
let gsBrlControlLabel=cscNull
if FocusRedirectedOnFocusChangedEventEx (hwndFocus, nObject, nChild,
hwndPrevFocus, nPrevObject, nPrevChild, nChangeDepth) then
return
endIf
If nChangeDepth == 1
&& hWndFocus == hWndPrevFocus then
Return
ActiveItemChangedEvent(hwndFocus,nObject,nChild,hwndPrevFocus,nPrevObject,nPrevChild)
EndIf
If giSkype4FocusChanged
&& hWndFocus == hWndPrevFocus then
let giSkype4FocusChanged = FALSE
Return FocusChangedEvent(hwndFocus,hwndPrevFocus)
EndIf
Return FocusChangedEventEx (hwndFocus, nObject, nChild, hwndPrevFocus,
nPrevObject, nPrevChild, nChangeDepth)
EndFunction
void function FocusChatFromParent ()
if getWindowClass (GetFocus ()) != wc_chat_edit_parent
&& GetObjectSubtypeCode (TRUE) != WT_DIALOG_PAGE then
return
endIf
var handle ChatWindow = findWindow (GetAppMainWindow (GetFocus ()),
WC_ChatEditWindowSkype5, "")
if ChatWindow then
SetFocus (ChatWindow)
endIf
endFunction
void function ProcessSayAppWindowOnFocusChange(handle AppWindow, handle
FocusWindow)
var
handle hWndPage
UnscheduleFunction (giFn_FocusChatFromParent)
if ( IsMacToolTipWindow (FocusWindow) )
then
return
endIf
if GlobalPrevApp != AppWindow then
; if the conversation gains focus, but the chat window is not in focus:
if getWindowClass (AppWindow) ==
wc_notification_incoming_chat_parent then
; the user may believe they are typing into the chat field, but
they are in fact on the container:
if getWindowClass (FocusWindow) == wc_chat_edit_parent
&& GetObjectSubtypeCode (TRUE) == WT_DIALOG_PAGE then
let giFn_FocusChatFromParent = ScheduleFunction
("FocusChatFromParent", 10)
endIf
endIf
endIf
if GlobalPrevApp == AppWindow
|| AppWindow == FocusWindow then
;We will catch this change when we speak the focus window, so just
return.
return
EndIf
if GlobalWasHjDialog then
;Do not speak the app name when exiting from an HJDialog back to
the application.
if !InHjDialog() then
return
else
;due to timing issues with the JAWS Find dialog,
;we cannot depend on the value returned by InHJDialog to tell
if the dialog has cleared.
;So, we test the previous hj dialog name:
if GlobalPrevRealName == cwn_JAWS_Find then
return
EndIf
EndIf
endIf
If !HandleCustomAppWindows(AppWindow) then
SayWindowTypeAndText(AppWindow)
EndIf
if IsMultiPageDialog () then
indicateControlType (WT_DIALOG_PAGE, getDialogPageName ())
endIf
endFunction
int Function ProcessSpaceBarKeyPressed(int nKey, string strKeyName, int
nIsBrailleKey, int nIsScriptKey)
var
Handle hFocus = GetFocus (),
String sClass = GetWindowClass (hFocus),
Handle hReal = GetRealWindow (hFocus),
String sRealClass = GetWindowClass (hReal)
If strKeyName == cKsSpace
If sRealClass == WC_OptionsDialogue then
if getObjectSubtypeCode (TRUE) == WT_CHECKBOX then
MSAARefresh ()
endIf
endIf
If getWindowClass (getFocus ()) == WC_HOTKEYS_LIST then
; Let ObjStateChangedEvent handle it.
return
endIf
If sRealClass == "TOptionsForm"
If sClass == "TAccessibleCheckListBox"
MSAARefresh (TRUE)
Return (TRUE)
EndIf
EndIf
EndIf
If sRealClass == WC_OptionsDialogue ; prior to Skype 4 and above
&& sClass == WC_Listbox then
;checkable state is announced automatically.
Return true
EndIf
return ProcessSpaceBarKeyPressed(nKey, strKeyName, nIsBrailleKey,
nIsScriptKey)
EndFunction
void function SayLineUnit (int unitMovement, int bMoved)
var
handle hwnd,
string sClass,
int iObjType
let hwnd=GetFocus()
let sClass=GetWindowClass (hwnd)
If IsPCCursor () then
If sClass== WC_HistoryList then
MSAARefresh ()
EndIf
If sClass == WC_HOTKEYS_LIST then
; handled by ActiveItemChangedEvent now
return
endIf
EndIf
if isWinVista() then
If GetWindowClass(GetRealWindow(hwnd))== WC_OptionsDialogue then
;prior to Skype 4 and above
let iObjtype=GetObjectSubtypeCode(true)
if iObjType==wt_comboBox then
delay(3,true)
sayMessage(ot_highlighted_screen_text,GetWindowTextEx(hwnd,false,true))
return
endIf
if sClass==wc_ChatAppearanceListboxControl then
delay(1)
sayMessage(ot_highlighted_screen_text,GetListboxItem())
return
endIf
endIf
endIf
SayLineUnit (unitMovement, bMoved)
EndFunction
void function SpeakHomeEndMovement()
var string sClass = getWindowClass (getFocus ())
If IsPCCursor () then
If sClass== WC_HistoryList then
MSAARefresh ()
EndIf
If sClass == WC_HOTKEYS_LIST then
; handled by ActiveItemChangedEvent now.
return
endIf
endIf
SpeakHomeEndMovement()
endFunction
void function ObjStateChangedEvent(handle hObj,optional int iObjType,
int nChangedState, int nState, int nOldState)
var string sClass = getWindowClass (getFocus ())
;If sClass == WC_HOTKEYS_LIST then
;return
;endIf
return ObjStateChangedEvent(hObj,iObjType, nChangedState, nState, nOldState)
endFunction
Void Function ValueChangedEvent (handle hwnd, int objId, int childId,
int nObjType, string sObjName, string sObjValue,int bIsFocusObject)
var
string sRealClass,
int iObjType
let sRealClass=GetWindowClass(GetRealWindow(hwnd))
let iObjtype=GetObjectSubtypeCode(true)
If sRealClass== WC_OptionsDialogue then ;prior to Skype 4 and above.
if iObjType==wt_comboBox
|| nObjType==wt_edit then
if isWinVista() then
return ;prevent multiple firing of this function and
multiple speaking.
endIf
sayMessage(ot_highlighted_screen_text,GetWindowText(hwnd,true))
return
endIf
endIf
If sRealClass==WC_Skype4OptionsDialogue then ;Skype 4 and above.
if iObjType==wt_comboBox then
sayMessage(ot_highlighted_screen_text,sObjValue);GetWindowText(GetFocus(),true))
return
endIf
endIf
ValueChangedEvent
(hwnd,objId,childId,nObjType,sObjName,sObjValue,bIsFocusObject)
EndFunction
Script HotKeyHelp()
;Remove old HotKeyHelp from prior versions of Skype, which was mainly
ScreenSensitiveHelp anyway.
;Supported versions are now 6.3 and later.
var
handle hFocus = GetFocus ()
if TouchNavigationHotKeys() then
return
endIf
if UserBufferIsActive () || InHjDialog () then
PerformScript HotKeyHelp()
Return
endIf
sayFormattedMessage (OT_USER_BUFFER,
msgHotKeyHelpBackgroundNotification+cscBufferNewLine)
If ! findWindow (getAppMainWindow (hFocus), WC_ChatEditWindowSkype5, "")
then
SayFormattedMessage(ot_user_buffer,MsgHotKeyHelpOutsideChatWindow)
endIf
SayFormattedMessage(ot_user_buffer,msgChatEditWindowHotkeyHelp)
AddHotKeyLinks()
EndScript
Script SayLine()
var
handle hwnd,
string sRealClass,
string sClass,
string sText,
string sHistoryItem,
int iObjType
let hwnd=GetFocus()
let sRealClass=GetWindowClass(GetRealWindow(hwnd))
let sClass=GetWindowClass(hwnd)
let iObjType=GetObjectSubtypeCode(true)
if IsPcCursor () && sClass == wc_About_Dialog then
;Make the About dialog read properly, it's a splash screen not really a
dialog:
say (GetObjectName (TRUE), OT_LINE)
RETURN
endIf
if IsPcCursor () && ! UserBufferIsActive () && ! MenusActive () then
sHistoryItem = GetChatHistoryItemName (hwnd)
if ! StringIsBlank (sHistoryItem) then
if IsSameScript () then
SpellString (sHistoryItem)
else
say (sHistoryItem, OT_LINE)
endIf
return
endIf
endIf
if sClass == wc_dialog_pages_tree && iObjType == WT_TREEVIEWITEM then
let sText = GetSkypeOptionsTreeViewItemName ()
if ! stringIsBlank (sText) then
if isSameScript () then
spellString (sText)
else
sayMessage (OT_LINE, sText)
endIf
return
endIf
endIf
If sRealClass== WC_OptionsDialogue then;prior to Skype 4 and above
if iObjType==wt_comboBox then
if isWinVista() then
sayMessage(ot_highlighted_screen_text,GetWindowTextEx(hwnd,false,true))
else
sayMessage(ot_highlighted_screen_text,GetWindowText(hwnd,true))
endIf
Return
elIf sClass== WC_Listbox then
SayObjectActiveItem()
SayCheckableListboxItemState()
return
elIf sClass==wc_ChatAppearanceListboxControl then
SayListboxControl()
return
endIf
EndIf
If sRealClass==WC_Skype4OptionsDialogue then ;Skype 4 and above.
if iObjType==wt_comboBox then
sayMessage(ot_highlighted_screen_text,GetWindowText(hwnd,true))
return
endIf
endIf
if IsPCCursor()
&& giProgramMajorVersion == 3
&& GetObjectSubtypecode() == wt_LeftRightSlider then
SayObjectTypeAndText(0)
return
EndIf
PerformScript SayLine()
EndScript
int function BrailleCallbackObjectIdentify ()
var
string sClass = getWindowClass (getFocus ())
if IsTouchCursor() then
return GetTouchNavElementBrlSubtype()
EndIf
if sClass == wc_About_Dialog
|| (sClass == wc_TPanel
&& ! GetObjectSubtypeCode (TRUE)) then
; because now we have no components for static, just add the string
here.
; as obtuse as it sounbds, users would not remove this content as a
component anyhow,
; or you would be left with a blank control.
BrailleAddString (GetObjectName (TRUE), 0,0,0)
return WT_STATIC
endIf
return BrailleCallbackObjectIdentify ()
endFunction
Int Function BrailleAddObjectType(int nType)
var
handle hwnd,
string sRealClass,
string sClass,
string sTemp
if IsTouchCursor() then
return BrailleAddObjectType(nType)
endIf
let hwnd=GetFocus()
let sRealClass=GetWindowClass (GetRealWindow (hWnd))
if sRealClass== WC_OptionsDialogue
|| sRealClass== WC_Skype4OptionsDialogue then
if nType==wt_link then
BrailleAddString(BrailleGetSubtypeString(wt_link),0,0,0)
return true
endIf
let sClass=GetWindowClass(hwnd)
if sClass==wc_ChatAppearanceListboxControl then
BrailleAddString(BrailleGetSubtypeString(wt_Listbox),0,0,0)
return True
endIf
if nType==wt_treeviewItem then
BrailleAddString(BrailleGetSubtypeString(wt_treeviewItem),0,0,0)
return true
endIf
endIf
return BrailleAddObjectType(nType)
EndFunction
Int Function BrailleAddObjectName(int nType)
var
handle hwnd,
string sRealClass,
string sClass,
string sObjName,
string smsg
if IsTouchCursor() then
return BrailleAddObjectName(nType)
endIf
let hwnd=GetFocus()
if nType == WT_BUTTON && getWindowClass (hwnd) == wc_CallQualityButton then
sObjName = getObjectName (TRUE)
if ! stringIsBlank (sObjName) then
sObjName = stringReplaceChars (sObjName, "*", " ")
sObjName = stringStripAllBlanks (sObjName)
if StringIsBlank (sObjName) then
sObjName = getObjectDescription (TRUE)
if StringLength (sObjName) then
BrailleAddString (sObjName, 0,0,0)
Return TRUE
endIf
endIf
endIf
endIf
if nType == WT_LISTBOX || nType == WT_LISTBOXITEM then
; Chat History needs no name and the one that's given is nonsense:
if GetChatHistoryItemName (hwnd) then
return TRUE
endIf
endIf
let sRealClass=GetWindowClass (GetRealWindow (hWnd))
if sRealClass== WC_OptionsDialogue then ;prior to Skype 4 and above
brailleAddString(gsBrlControlLabel,0,0,0)
if gsBrlStaticText!=cscNull then
BrailleAddString(gsBrlStaticText,0,0,0)
endIf
let sClass=GetWindowClass(hwnd)
if nType==wt_link then
let sObjName=GetObjectName(true)
if sClass==WC_Panner then ;help window for example links
BrailleAddString(msgHideHelpWindow,GetCursorCol(),GetCursorRow(),attrib_highlight)
else
BrailleAddString(sObjName,GetCursorCol(),GetCursorRow(),attrib_highlight)
endIf
return true
endIf
if sClass==WC_Panner then ;help window for example links
BrailleAddString(GetWindowTextEx(ghHelpWindow,false,true),0,0,0)
return true
endIf
if sClass==wc_ChatAppearanceListboxControl then
BrailleAddString(GetListboxItem(),0,0,0)
return true
endIf
ElIf sRealClass== WC_Skype4OptionsDialogue then ;Skype 4 and above
brailleAddString(gsBrlControlLabel,0,0,0)
if gsBrlStaticText!=cscNull then
BrailleAddString(gsBrlStaticText,0,0,0)
endIf
let sClass=GetWindowClass(hwnd)
if nType==wt_link then
let sObjName=GetObjectName(true)
BrailleAddString(sObjName,GetCursorCol (),GetCursorRow
(),attrib_highlight)
return TRUE
endIf
if nType==wt_treeviewItem then ;prevent double display of Options name.
return true
endIf
endIf
return BrailleAddObjectName(nType)
EndFunction
int function BrailleAddObjectValue(int nSubtype)
var
handle hwnd = getFocus (),
object UIA,
string sHistoryItem,
string SkypeOptionsTreeViewItemName
if IsTouchCursor() then
return BrailleAddObjectValue(nSubtype)
endIf
if nSubtype == WT_LISTBOX || nSubtype == WT_LISTBOXITEM then
sHistoryItem = GetChatHistoryItemName (hwnd)
if ! StringIsBlank (sHistoryItem) then
BrailleAddString (sHistoryItem, GetCursorCol (), GetCursorRow
(), 0)
return TRUE
endIf
EndIf
if getWindowClass (hwnd) == wc_ScreenSharing
&& nSubtype == WT_LISTBOX then
UIA = GetUIAObjectTree (hwnd)
if UIA then
UIA = UIA.FirstChild
endIf
if UIA && ! StringIsBlank (UIA.Name) then
BrailleAddString (UIA.Name, 0,0,0)
return TRUE
EndIf
endIf
;For about dialog splash screen:
if nSubtype == WT_STATIC && getWindowClass (getFocus ()) ==
wc_About_Dialog then
BrailleAddString (GetObjectValue (TRUE), 0,0,0)
return TRUE
endIf
if nSubtype == wt_LeftRightSlider
&& giProgramMajorVersion == 3 then
BrailleAddString(GetSkype3SliderPercentage(),0,0,0)
return true
elIf nSubtype == WT_TREEVIEW || nSubtype == WT_TREEVIEWITEM then
SkypeOptionsTreeViewItemName = GetSkypeOptionsTreeViewItemName ()
if ! stringIsBlank (SkypeOptionsTreeViewItemName) then
BrailleAddString (SkypeOptionsTreeViewItemName, getCursorCol
(), getCursorRow (), ATTRIB_HIGHLIGHT)
return TRUE
endIf
EndIf
return BrailleAddObjectValue(nSubtype)
EndFunction
Int Function BrailleAddObjectState(int nType)
var
handle hwnd = GetFocus (),
string sClass = GetWindowClass (hwnd),
int iState,
Int iOption
if IsTouchCursor() then
return BrailleAddObjectState(nType)
endIf
if GetWindowClass (GetRealWindow (hWnd))== WC_OptionsDialogue then ;
prior to Skype 4 and above
if nType==wt_listbox then
If sClass== WC_Listbox then
let iState=checkableListboxItemState()
if iState==ctrl_checked then
SuppressG2TranslationForNextStructuredModeSegment()
BrailleAddString(cmsgBrailleChecked1_L,0,0,0)
return false
elIf iState==ctrl_unchecked then
SuppressG2TranslationForNextStructuredModeSegment()
BrailleAddString(cmsgBrailleUnchecked1_L,0,0,0)
return false
endIf
endIf
elIf nType==wt_LeftrightSlider then
if gsBrlState!=cscNull then
SuppressG2TranslationForNextStructuredModeSegment()
BrailleAddString(gsBrlState ,0,0,0)
return true
endIf
EndIf
endIf
If sClass == WC_Skype6CheckableListBox
iOption = GetJCFOption (OPT_MSAA_Mode)
SetJCFOption (OPT_MSAA_Mode, 2)
SuppressG2TranslationForNextStructuredModeSegment()
BrailleAddString (BrailleGetStateString (GetControlAttributes ()),
GetCursorCol (), GetCursorRow (), 0)
SetJCFOption (OPT_MSAA_Mode, iOption)
EndIf
return BrailleAddObjectState(nType)
EndFunction
int function BrailleAddObjectPosition (int nSubtype)
if IsTouchCursor() then
return BrailleAddObjectPosition (nSubtype)
endIf
;Prevents false position info from being Brailled for the Skype Options tree
if nSubtype == WT_TREEVIEW || nSubtype == WT_TREEVIEWITEM then
if getWindowClass(getFocus ()) == wc_dialog_pages_tree then
return TRUE ; no position info is relevant in this tree.
endIf
endIf
return BrailleAddObjectPosition (nSubtype)
endFunction
int Function CheckableListboxItemState()
var
string sText
;for the case where the graphic is the only way to obtain the checkable
listbox item state:
saveCursor()
InvisibleCursor()
RouteInvisibleToPC()
JAWSHome()
let sText=stringLower(GetLine())
if stringContains(sText,scCheckmark) then
RestoreCursor()
PCCursor()
return ctrl_checked
elIf stringContains(sText,scUnchecked) then
RestoreCursor()
PCCursor()
return ctrl_unchecked
else
RestoreCursor()
PCCursor()
return ctrl_none
endIf
EndFunction
Void Function SayCheckableListboxItemState()
var
int iState
let iState=CheckableListboxItemState()
if iState==ctrl_checked then
SayMessage(ot_item_state,cmsg_checked)
elIf iState==ctrl_unchecked then
SayMessage(ot_item_state,cmsg_NotChecked)
EndIf
EndFunction
script SayWindowPromptAndText()
var
handle hwnd,
int iObjtype,
string sObjName
let hwnd=GetFocus()
;prior to Skype 4 and above:
if GetWindowClass(GetRealWindow(hwnd))==WC_OptionsDialogue then
let iObjtype=GetObjectSubtypeCode(true)
let sObjName=GetObjectName()
if iObjtype==wt_comboBox then
indicateControlType(iObjType,sObjName,GetWindowTextEx(hwnd,false,true))
endIf
if IsWindowVisible(ghHelpWindow)
&& iObjType==wt_link then
sayWindow(ghHelpWindow,false)
endIf
If GetWindowClass(hwnd)==wc_ChatAppearanceListboxControl then
SayListboxControl()
endIf
endIf
performscript SayWindowPromptAndText()
EndScript
Void Function NewTextEvent (handle hwnd, string buffer, int nAttributes,
int nTextColor, int nBackgroundColor, int nEcho, string sFrameName)
If GetWindowClass(GetRealWindow(hwnd))== WC_OptionsDialogue then;prior
to Skype 4 and above
if GetWindowClass(hwnd)==WC_Panner then ;help window for example links
let ghHelpWindow=hwnd
if gbAlreadySpoken then
let gbAlreadySpoken=false
return
else
sayWindow(hwnd,false)
if BrailleInUse() then
BrailleMessage(GetWindowTextEx(hwnd,false,true))
endIf
let gbAlreadySpoken=true
return
endIf
endIf
endIf
NewTextEvent
(hwnd,buffer,nAttributes,nTextColor,nBackgroundColor,nEcho,sFrameName)
EndFunction
string function GetCustomTutorMessage()
var
Handle hFocus,
String sWindowClass
if globalMenuMode==menu_active then
return msgMenu
elIf globalMenuMode==Menubar_Active then
return msgMenuBar
EndIf
let hFocus = GetFocus ()
let sWindowClass = GetWindowClass (hFocus)
If sWindowClass == WC_Skype4ContactList
|| sWindowClass == WC_ConversationList
|| sWindowClass == WC_HistoryList then
Return msgListbox
EndIf
Return GetCustomTutorMessage()
EndFunction
String Function GetListboxItem()
;for situations where Braille or speech does not see the correct listbox
item as in the Chat appearance page of the Options dialog prior to 4.0.
var
string sText
SaveCursor()
InVisibleCursor()
JAWSPageUp()
FindString(GetCurrentWindow(),sc_chatstyle,s_next,s_unrestricted)
let sText=GetLine()
if isWinVista() then
return sText
else
let sText=stringLeft(sText,stringContains(sText,scScrollSymbol)-1)
endIf
restoreCursor()
PCCursor()
return sText
EndFunction
Void Function SayListboxControl()
;for situations where the listbox control cannot easily be parsed:
say(GetListboxItem(),ot_line)
EndFunction
string function FindHotKey(string ByRef sPrompt)
var
Handle hSkypeStyleMenu,
Object oMenuBar,
String sItem,
String sItemName,
Int iLeft,
Int iRight,
Int iTop,
Int iBottom,
Int iLoop,
Int iNumberOfItems,
Int iChildID,
Int iTemp
let hSkypeStyleMenu = FindWindow (GetAppMainWindow (GetFocus ()),
WC_Skype4SkypeStyleMenuBar, cScNull)
If hSkypeStyleMenu
&& GlobalMenuMode == MENUBAR_ACTIVE
&& (! MenusActive ()) then
If GetWindowRect (hSkypeStyleMenu, iLeft, iRight, iTop, iBottom) then
let sItem = GetTextInRect (iLeft, iTop, iRight, iBottom,
ATTRIB_HIGHLIGHT, IgnoreColor, IgnoreColor, FALSE)
let oMenuBar = GetObjectFromEvent (hSkypeStyleMenu,
OBJID_CLIENT, iChildID, iTemp)
let iNumberOfItems = oMenuBar.accChildCount
While iLoop < iNumberOfItems
let iLoop = iLoop + 1
let sItemName = oMenuBar.accName (iLoop)
If Not StringCompare (sItem, sItemName, TRUE) then
Return (StringSegment (oMenuBar.accKeyBoardShortCut
(iLoop), cscKeyNameComponentSeparator, 2))
EndIf
EndWhile
EndIf
EndIf
Return (FindHotKey(sPrompt))
EndFunction
Script BrailleRouting()
var
int nCell,
string sClass,
string sRealClass = getWindowClass (GetRealWindow (GetFocus ()))
;handle the situation where a checkable listbox needs to be toggled.
if BrailleIsMessageBeingShown() then
brailleClearMessage()
return
endIf
let nCell = GetLastBrailleRoutingKey ()
if gbBrailleStudyModeActive then
SALModeButton(nCell,sal_SayCharacter)
return
EndIf
if not GetFocus() then
MinimizeAllApps ()
return
endIf
let sClass=getWindowClass(GetFocus())
If sRealClass == WC_OptionsDialogue then
if getObjectSubtypeCode (TRUE) == WT_CHECKBOX then
BrailleRoutingButton(nCell)
MSAARefresh ()
return
endIf
endIf
If sClass== WC_Listbox
|| sClass==WC_CheckableListbox
|| sClass==WC_CheckabelListView
|| sClass==WC_AccessibleCheckableListbox then
TypeKey(cksSpace,2)
return
endIf
performscript BrailleRouting()
EndScript
Script ScreenSensitiveHelp()
var
Handle hwnd,
String sClass
if IsSameScript () then
AppFileTopic (topic_Skype)
return
endIf
let hwnd = GetFocus ()
let sClass = GetWindowClass (hwnd)
If sClass == WC_Skype4ContactList
|| sClass == WC_ConversationList
|| sClass == WC_HistoryList then
SayFormattedMessage(ot_user_buffer,(FormatString
(MSG_ContactListScreenSensitiveHelp, GetObjectName (TRUE, 1))))
sayMessage(ot_user_buffer,cscBufferNewLine+cmsgBuffExit)
return
elIf GetWindowClass(GetRealWindow(hwnd))==WC_Skype4OptionsDialogue
&& sClass== WC_OptionsTreeView then
ScreenSensitiveHelpForKnownClasses(wt_treeview)
sayMessage(ot_user_buffer,cscBufferNewLine+cmsgBuffExit)
return
endIf
PerformScript ScreenSensitiveHelp()
EndScript
string function GetSkype3SliderPercentage()
var
handle hWnd,
int left, int top, int right, int bottom,
int iPos,
int iRange,
int iPercentage,
int iGraphicsSetting
if giProgramMajorVersion != 3
|| GetObjectSubtypecode() != wt_LeftRightSlider then
return cscNull
EndIf
let hWnd = getFocus()
;This technique will not work in the sliders that appear during a call,
;but should work in the Options dialog.
if !(StringCompare(GetWindowName(GetRealWindow(hWnd)),wn_SkypeOptions)
== 0) then
return cmsgUnknownPercentage
EndIf
let iGraphicsSetting = GetJCFOption(OPT_INCLUDE_GRAPHICS)
SetJCFOption(OPT_INCLUDE_GRAPHICS,2)
GetWindowRect(hwnd,left,right,top,bottom)
SaveCursor()
RouteInvisibleToPC()
if MoveToGraphic(GRAPHIC_FIRST,true) then
let iPos = GetCursorCol()-left
EndIf
RestoreCursor()
SetJCFOption(OPT_INCLUDE_GRAPHICS,iGraphicsSetting)
if !iPos then
return cmsgUnknownPercentage
EndIf
;The range will equal the width of the window,
;minus a small amout since the position we get for the graphic location
is its left edge:
let iRange = right-left
let iRange = iRange-(iRange/20)
;now, get the percentage of the range in steps of 5 percentage points:
let iPercentage = (iPos*100)/iRange
if iPercentage%5 then
let iPercentage = ((iPercentage/5)+1)*5
EndIf
return FormatString(cmsgPercentage,IntToString(iPercentage))
EndFunction
void function SayWord()
;function SayWord is used to speak sliders when they change
if IsPCCursor()
&& giProgramMajorVersion == 3
&& GetObjectSubtypecode() == wt_LeftRightSlider then
Say(GetSkype3SliderPercentage(),ot_word)
return
EndIf
SayWord()
EndFunction
void function SayObjectTypeAndText(optional int nLevel)
var
handle hWnd = GetCurrentWindow (),
string sName,
string sClass = getWindowClass (hwnd),
string sTreeItem
If InHomeRowMode()
|| !IsPcCursor()
|| UserBufferIsActive() then
SayObjectTypeAndText (nLevel)
Return
EndIf
if sClass == wc_TPanel
&& ! GetObjectSubtypeCode (TRUE, nLevel) then
Say(GetWindowTextEx(hwnd, 0,0), OT_CONTROL_NAME)
return
endIf
if sClass == WC_Skype6CheckableListBox then
return SayControlEXWithMarkup (getCurrentWindow (), "", "",
GetObjectState (TRUE))
endIf
if sClass == wc_CallQualityButton then
sName = getObjectName (TRUE)
if ! stringIsBlank (sName) then
sName = stringReplaceChars (sName, "*", " ")
sName = stringStripAllBlanks (sName)
if StringIsBlank (sName) then
sName = getObjectDescription (TRUE)
if StringLength (sName) then
IndicateControlType (getObjectSubtypeCode (TRUE), sName)
Return
endIf
endIf
endIf
elIf sClass == wc_dialog_pages_tree then
let sTreeItem = GetSkypeOptionsTreeViewItemName ()
if ! StringIsBlank (sTreeItem) then
return indicateControlType (WT_TREEVIEW, getObjectName (TRUE,
1), sTreeItem)
endIf
endIf
if giProgramMajorVersion == 3
&& GetObjectSubtypecode() == wt_LeftRightSlider then
if nLevel == 0 then
SayObjectTypeAndText(nLevel)
Say(GetSkype3SliderPercentage(),ot_line)
return
EndIf
EndIf
if dialogActive ()
&& getObjectSubtypeCode (TRUE, nLevel) == WT_LINK
&& getWindowClass (GetCurrentWindow ()) == wcSkypeCheckboxInDialog then
return sayObjectActiveItem ()
endIf
SayObjectTypeAndText(nLevel)
EndFunction
void function tutorMessageEvent(handle hwndFocus, int nMenuMode)
If GlobalTutorSuppress
Return
EndIf
tutorMessageEvent(hwndFocus, nMenuMode)
EndFunction
Script MoveToChatEntryField ()
; modifying this entry
var handle
; hWnd = findWindow (getAppMainWindow (getFocus ()),
WC_ChatEditWindowSkype5, "")
hWnd = findWindow (getAppMainWindow (getFocus ()), "TChatRichEdit" , "")
if ! hWnd then
sayMessage (OT_ERROR, msgChatWindowNotAvailable)
else
sayMessage (OT_JAWS_MESSAGE, msgChatWindow)
setFocus (hWnd)
endIf
endScript
script Enter ()
PerformScript Enter ()
;Keep notifications from announcing who's typing after you pressed enter
from chat to send message.
gbEnterInChatField = (getWindowClass (getFocus ()) ==
WC_ChatEditWindowSkype5)
endScript
Script AssignConversation (int iConversationID)
var
string sName,
handle hWnd = findWindow (getAppMainWindow (getFocus ()),
WC_ChatEditWindowSkype5, ""),
handle hName
If IsWindowVisible (hWnd) Then
let hName =getParent (GetParent(GetFocus()))
let sName=StringTrimTrailingBlanks (getWindowName (hName))+cscSpace
If iConversationID == 1 Then
let hMsnWindow1=hWnd
let gsConversationName1=sName
ElIf iConversationID == 2 Then
let hMsnWindow2=hWnd
let gsConversationName2=sName
ElIf iConversationID == 3 Then
let hMsnWindow3=hWnd
let gsConversationName3=sName
ElIf iConversationID == 4 Then
let hMsnWindow4=hWnd
let gsConversationName4=sName
ElIf iConversationID == 5 Then
let hMsnWindow5=hWnd
let gsConversationName5=sName
EndIf ; End of ID check.
SayUsingVoice(VCTX_MESSAGE,sName+msgAssignedTo+IntToString(iConversationID),OT_USER_REQUESTED_INFORMATION)
Else
Say(msgNotInConversationWindow,OT_ERROR)
EndIf
EndScript
void function SayCharacterUnit(int UnitMovement)
Var
Handle hFocus = GetFocus (),
String sClass = GetWindowClass (hFocus)
If sClass == WC_VolumeControl
MSAARefresh (TRUE)
Say (GetObjectValue (TRUE), OT_SELECTED_ITEM)
Return
EndIf
Return (SayCharacterUnit (UnitMovement))
EndFunction
script ReadBoxInTabOrder ()
if GetWindowClass (GetFocus ()) == wc_About_Dialog then
;Make the About dialog read properly, it's a splash screen not really a
dialog:
SayMessage (OT_ERROR, msgAboutSkype)
say (GetObjectName (TRUE), OT_LINE)
RETURN
endIf
PerformScript ReadBoxInTabOrder ()
endScript
Script movetoEdit ()
var handle hParent,
handle hWnd
hParent = GetParent (GetCurrentWindow()) ; I use it because the focus
is on one of the sibling controls.
; hParent = GetNextWindow ((GetCurrentWindow())
; hWnd = FindWindow (hParent ,"TSearchControl" )
; hwnd = findWindow (getRealWindow (getFocus ()), "TOptionsPanel", "")
hwnd = findWindow (getRealWindow (getFocus ()), "TSearchControl")
saystring ("found the edit box")
setfocus(hWnd )
EndScript
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
__________�
View the list's information and change your settings at
//www.freelists.org/list/jawsscripts
__________�
View the list's information and change your settings at
//www.freelists.org/list/jawsscripts