Get the window located at the given coordinates in the desktop. If no such window exists an exception is raised. @see: L{find_window} @type x: int @param x: Horizontal coordinate. @type y: int @param y: Vertical coordinate. @rtype
(x, y)
| 163 | |
| 164 | @staticmethod |
| 165 | def get_window_at(x, y): |
| 166 | """ |
| 167 | Get the window located at the given coordinates in the desktop. |
| 168 | If no such window exists an exception is raised. |
| 169 | |
| 170 | @see: L{find_window} |
| 171 | |
| 172 | @type x: int |
| 173 | @param x: Horizontal coordinate. |
| 174 | @type y: int |
| 175 | @param y: Vertical coordinate. |
| 176 | |
| 177 | @rtype: L{Window} |
| 178 | @return: Window at the requested position. If no such window |
| 179 | exists a C{WindowsError} exception is raised. |
| 180 | |
| 181 | @raise WindowsError: An error occured while processing this request. |
| 182 | """ |
| 183 | return Window(win32.WindowFromPoint((x, y))) |
| 184 | |
| 185 | @staticmethod |
| 186 | def get_foreground_window(): |