oleacc module

oleacc.LresultFromObject(wParam, obj)

returns a reference, similar to a handle, to the specified object. Servers return this reference when handling WM_GETOBJECT. @param wParam: the wParam value passed in with WM_GETOBJECT. @type wParam: int @param obj: the COM object instance you want a reference for. @type obj: COMObject @return: a reference to the object. @rtype: int

oleacc.ObjectFromLresult(res, wParam, interface)

retrieves a requested interface pointer for an accessible object based on a previously generated object reference. @param res: the previously generated object reference. @type res: int @param wParam: the wParam value passed in with WM_GETOBJECT. @type wParam: int @param interface: the requested COM interface. @type interface: comtypes COM interface @return: the object. @rtype: COMObject

oleacc.CreateStdAccessibleProxy(hwnd, className, objectID, interface=<class 'comtypes.gen._1EA4DBF0_3C3B_11CF_810C_00AA00389B71_0_1_1.IAccessible'>)

creates an accessible object using a specific window class, with the methods and properties of the specified type of system-provided user interface element. @param hwnd: the handle of the window this accessible object should represent. @type hwnd: int @param className: the window class name to use. @type className: str @param objectID: an OBJID_* constant or custom value stating the specific object in the window. @type objectID: int @param interface: the requested COM interface for this object. Defaults to IAccessible. @type interface: comtypes COM interface @return: the created object. @rtype: COMObject

oleacc.CreateStdAccessibleObject(hwnd, objectID, interface=<class 'comtypes.gen._1EA4DBF0_3C3B_11CF_810C_00AA00389B71_0_1_1.IAccessible'>)

creates an accessible object with the methods and properties of the specified type of system-provided user interface element. @param hwnd: the handle of the window this accessible object should represent. @type hwnd: int @param objectID: an OBJID_* constant or custom value stating the specific object in the window. @type objectID: int @param interface: the requested COM interface for this object. Defaults to IAccessible. @type interface: comtypes COM interface @return: the created object. @rtype: COMObject

oleacc.AccessibleObjectFromWindow(hwnd, objectID, interface=<class 'comtypes.gen._1EA4DBF0_3C3B_11CF_810C_00AA00389B71_0_1_1.IAccessible'>)

Retreaves a COM object from the given window, with the given object ID. @param hwnd: the handle of the window to retreave the object from. @type hwnd: int @param objectID: one of the OBJID_* constants or a custom positive value representing the specific object you want to retreave. @type objectID: int @param interface: the requested COM interface you wish to use on the retreaved object. @type interface: comtypes COM interface @return: the retreaved object. @rtype: COMObject

oleacc.AccessibleObjectFromWindow_safe(hwnd, objectID, interface=<class 'comtypes.gen._1EA4DBF0_3C3B_11CF_810C_00AA00389B71_0_1_1.IAccessible'>, timeout=2)
oleacc.AccessibleObjectFromEvent(hwnd, objectID, childID)

Retreaves an IAccessible object from the given window, with the given object ID and child ID. @param hwnd: the handle of the window to retreave the object from. @type hwnd: int @param objectID: one of the OBJID_* constants or a custom positive value representing the specific object you want to retreave. @type objectID: int @param childID: the ID of the child element you wish to retreave. @type childID: int @return: the retreaved object. @rtype: COMObject

oleacc.AccessibleObjectFromEvent_safe(hwnd, objectID, childID, timeout=2)
oleacc.WindowFromAccessibleObject(pacc)

Retreaves the handle of the window this IAccessible object belongs to. @param pacc: the IAccessible object who’s window you want to fetch. @type pacc: POINTER(IAccessible) @return: the window handle. @rtype: int

oleacc.AccessibleObjectFromPoint(x, y)
oleacc.AccessibleChildren(pacc, iChildStart, cChildren)
oleacc.GetProcessHandleFromHwnd(windowHandle)

Retrieves a process handle of the process who owns the window. This uses GetProcessHandleFromHwnd found in oleacc.dll which allows a client with UIAccess to open a process that is elevated. @param windowHandle: a window of a process you wish to retreave a process handle for @type windowHandle: integer @returns: a process handle with read, write and operation access @rtype: integer

oleacc.GetRoleText(role)
oleacc.GetStateText(state)