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 set_message(self, msg=b''): ctrl = win32gui.GetDlgItem(self.hwnd, IDC_MESSAGE) win32gui.SetWindowText(ctrl, msg)
def clear_script(self): ctrl = win32gui.GetDlgItem(self.hwnd, IDC_SCRIPT) win32gui.SetWindowText(ctrl, b'')
def _set_status_message(self, msg=b''): ctrl = win32gui.GetDlgItem(self.hwnd, IDC_LABEL_STATUS) win32gui.SetWindowText(ctrl, msg)
def _set_text(self, text): return win32gui.SetWindowText(self.handle, text)