python类MessageBox()的实例源码

win32_counter.py 文件源码 项目:KeyCounter 作者: Microcore 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def instance_running(self):
        '''
        Use CreateEvent to make sure there is only one instance running
        '''
        if self.SICHECK_EVENT is None:
            self.SICHECK_EVENT = win32event.CreateEvent(
                None, 1, 0, self.GUID
            )
            # An instance is already running, quit
            if win32api.GetLastError() == winerror.ERROR_ALREADY_EXISTS:
                win32gui.MessageBox(
                    self.HWND,
                    'You can only run one instance at a time',
                    'Seems like KeyCounter is already running',
                    win32con.MB_OK
                )
                return self.stop()
copy_hook.py 文件源码 项目:Email_My_PC 作者: Jackeriss 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
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)
context_menu.py 文件源码 项目:Email_My_PC 作者: Jackeriss 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def InvokeCommand(self, ci):
        mask, hwnd, verb, params, dir, nShow, hotkey, hicon = ci
        win32gui.MessageBox(hwnd, "Hello", "Wow", win32con.MB_OK)
copy_hook.py 文件源码 项目:remoteControlPPT 作者: htwenning 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
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)
context_menu.py 文件源码 项目:remoteControlPPT 作者: htwenning 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def InvokeCommand(self, ci):
        mask, hwnd, verb, params, dir, nShow, hotkey, hicon = ci
        win32gui.MessageBox(hwnd, "Hello", "Wow", win32con.MB_OK)
copy_hook.py 文件源码 项目:CodeReader 作者: jasonrbr 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
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)
context_menu.py 文件源码 项目:CodeReader 作者: jasonrbr 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def InvokeCommand(self, ci):
        mask, hwnd, verb, params, dir, nShow, hotkey, hicon = ci
        win32gui.MessageBox(hwnd, "Hello", "Wow", win32con.MB_OK)
cPAMIE.py 文件源码 项目:Automation-Framework-for-devices 作者: tok-gogogo 项目源码 文件源码 阅读 16 收藏 0 点赞 0 评论 0
def pause(self, string = "Click to Continue test"):
        """ Wait for the user to click a button to continue testing.
            parameters:
                [string]  = Message to display to user
            returns:
                None
        """
        self._wait()
        try:
           win32gui.MessageBox(0, string, "Pausing test...", 0)
        except:
            (ErrorType,ErrorValue,ErrorTB)=sys.exc_info()
            print sys.exc_info()
            traceback.print_exc(ErrorTB)
        else:   return True
PAM30.py 文件源码 项目:Automation-Framework-for-devices 作者: tok-gogogo 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def pause(self, string = "Click to Continue test"):
        """ Wait for the user to click a button to continue testing.
            parameters:
                [string]  = Message to display to user
            returns:
                None
        """
        self._wait()
        try:
           win32gui.MessageBox(0, string, "Pausing test...", 0)
        except:
            (ErrorType,ErrorValue,ErrorTB)=sys.exc_info()
            print (sys.exc_info())
            traceback.print_exc(ErrorTB)
        else:   return True


问题


面经


文章

微信
公众号

扫码关注公众号