def run(self, catch_errors=True): """ uses scripter_runtime to call a script """ try: win = Scripter.activeWindow if win: win.redraw = self.redraw run_filename( self.filename, self.subroutine, extension=(self.mode == "extension"), background=self.background_mode ) if win: win.redraw = True if not self.redraw: win.update() except: if not catch_errors: raise excepthook.show_current_error("Error running %r" % os.path.basename(self.filename))
def run(self, catch_errors=True): """ uses scripter_runtime to call a script """ try: win = Scripter.activeWindow if win: win.redraw = self.redraw run_filename(self.filename, self.subroutine, extension=(self.mode == "extension"), background=self.background_mode) if win: win.redraw = True if not self.redraw: win.update() except: if not catch_errors: raise excepthook.show_current_error("Error running %r" % os.path.basename(self.filename))