示例#1
0
 def run(self):
     if self.hidden:
         psn    = ProcessSerialNumber(0, kCurrentProcess)
         ApplicationServices.TransformProcessType(psn, kProcessTransformToUIElementAppication)
     else:
         psn    = ProcessSerialNumber(0, kCurrentProcess)
         ApplicationServices.TransformProcessType(psn, kProcessTransformToForegroundApplication)
     self.win.makeKeyAndOrderFront_(None)
     self.win.display()
     NSApp.activateIgnoringOtherApps_(True)
     NSApp.run()
示例#2
0
 def run(self):
     # You could adjust the 1.0 here to how ever many seconds you wanted to wait between checks to terminate
     self.timer = NSTimer.scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_(
         1.0, self, self.checkProcess_, None, True)
     NSApp.run()
示例#3
0
 def run(self):
     NSTimer.scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_(
         0.1, self, 'runAndStop:', '', False)
     NSApplication.sharedApplication()
     NSApp.run()
示例#4
0
 def run(self):
     # You could adjust the 1.0 here to how ever many seconds you wanted to wait between checks to terminate
     self.timer = NSTimer.scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_(1.0, self, self.checkProcess_, None, True)
     NSApp.run()