def append_message(self, msg): ctrl = win32gui.GetDlgItem(self.hwnd, IDC_MESSAGE) old_msg = win32gui.GetWindowText(ctrl) new_msg = old_msg + PROMPT1 + msg.strip() + NEW_LINE win32gui.SetWindowText(ctrl, new_msg) self._scroll_message(ctrl)
def OnCommand(hwnd, msg, wparam, lparam): id = win32api.LOWORD(wparam) if id in [win32con.IDOK]: data["username"] = win32gui.GetWindowText(win32gui.GetDlgItem(hwnd, 1000)) data["password"] = win32gui.GetWindowText(win32gui.GetDlgItem(hwnd, 1001)) win32gui.EndDialog(hwnd, id)
def _get_text(self): return win32gui.GetWindowText(self.handle)
def proc(hwnd, ar): title = winxpgui.GetWindowText(hwnd) if ar[0] in title: #print hwnd, title ar[1].append(hwnd) return 1