Python win32gui.MessageBox() Examples
The following are 8
code examples of win32gui.MessageBox().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
win32gui
, or try the search function
.
Example #1
Source File: ShowMessageBox.py From EventGhost with GNU General Public License v2.0 | 5 votes |
def onClose(self, evt): retCode = self.GetReturnCode() if retCode not in self.LABELS: return if self.timer: self.timer.Stop() del self.timer ix = 1 + self.action.RES_IDS.index(retCode) if retCode in self.action.RES_IDS else 1 result = self.action.RESULTS[ix] self.alias = self.alias if self.alias else self.title if self.payload: eg.TriggerEvent("%s.%s" % (self.alias, result), self.payload, "MessageBox") else: eg.TriggerEvent("%s.%s" % (self.alias, result), prefix = "MessageBox") if self.event is not None: self.action.retCode = result SetEvent(self.event) self.Destroy()
Example #2
Source File: context_menu.py From Email_My_PC with MIT License | 5 votes |
def InvokeCommand(self, ci): mask, hwnd, verb, params, dir, nShow, hotkey, hicon = ci win32gui.MessageBox(hwnd, "Hello", "Wow", win32con.MB_OK)
Example #3
Source File: copy_hook.py From ironpython2 with Apache License 2.0 | 4 votes |
def CopyCallBack(self, hwnd, func, flags, srcName, srcAttr, destName, destAttr): # This function should return: # IDYES Allows the operation. # IDNO Prevents the operation on this folder but continues with any other operations that have been approved (for example, a batch copy operation). # IDCANCEL Prevents the current operation and cancels any pending operations. print "CopyCallBack", hwnd, func, flags, srcName, srcAttr, destName, destAttr return win32gui.MessageBox(hwnd, "Allow operation?", "CopyHook", win32con.MB_YESNO)
Example #4
Source File: context_menu.py From ironpython2 with Apache License 2.0 | 4 votes |
def InvokeCommand(self, ci): mask, hwnd, verb, params, dir, nShow, hotkey, hicon = ci win32gui.MessageBox(hwnd, "Hello", "Wow", win32con.MB_OK)
Example #5
Source File: __init__.py From pyrexecd with MIT License | 4 votes |
def msgbox(text, caption='Error'): win32gui.MessageBox(None, text, caption, (win32con.MB_OK | win32con.MB_ICONERROR)) return
Example #6
Source File: utils.py From ComicStreamer with Apache License 2.0 | 4 votes |
def alert(title, msg): if getattr(sys, 'frozen', None): if platform.system() == "Darwin": import Tkinter, tkMessageBox root = Tkinter.Tk() root.lift() root.attributes('-topmost', 1) root.withdraw() tkMessageBox.showinfo(title, msg) elif platform.system() == "Windows": import win32gui win32gui.MessageBox(0,msg,title,0)
Example #7
Source File: ShowMessageBox.py From EventGhost with GNU General Public License v2.0 | 4 votes |
def showMessageBox(self, title, body, alias, payload, options): if not alias: alias = title result = MessageBox(0, body, title, options) if result > 0 and result < 8: result = self.RESULTS[result] else: result = str(result) if payload: eg.TriggerEvent("%s.%s" % (alias, result), payload, "MessageBox") else: eg.TriggerEvent("%s.%s" % (alias, result), prefix = "MessageBox") return result
Example #8
Source File: copy_hook.py From Email_My_PC with MIT License | 4 votes |
def CopyCallBack(self, hwnd, func, flags, srcName, srcAttr, destName, destAttr): # This function should return: # IDYES Allows the operation. # IDNO Prevents the operation on this folder but continues with any other operations that have been approved (for example, a batch copy operation). # IDCANCEL Prevents the current operation and cancels any pending operations. print "CopyCallBack", hwnd, func, flags, srcName, srcAttr, destName, destAttr return win32gui.MessageBox(hwnd, "Allow operation?", "CopyHook", win32con.MB_YESNO)