def buildAdHocCommand(self, commandScript, bundle, name = None, commandInput = "none", commandOutput = "insertText"): commandHash = { 'command': commandScript, 'input': commandInput, 'output': commandOutput } commandHash['name'] = name if name is not None else "Ad-Hoc command %s" % commandScript command = PMXCommand(self.uuidgen(), dataHash = commandHash) command.setBundle(bundle) command.setManager(self) return command
def executeCommandWithOptions(self, commandHash): command = PMXCommand(self.editor.application.supportManager.uuidgen(), dataHash=commandHash) command.setBundle(self.macro.bundle) command.setManager(self.macro.manager) self.editor.insertBundleItem(command, asynchronous=False)
def executeCommandWithOptions(self, commandHash): command = PMXCommand(self.editor.application.supportManager.uuidgen(), dataHash = commandHash) command.setBundle(self.macro.bundle) command.setManager(self.macro.manager) self.editor.insertBundleItem(command, asynchronous = False)