def change_tab(self, words): direction = 'gt' if words[0] == 'left': direction = 'gT' num = int(baseutils.set_number(words)) for i in range(num): if i != 0: time.sleep(.1) api.send_string('{escape}{escape}' + direction)
def indent(self, words): indent_commands = { 'shoot': '{alt+h}', 'ball': '{alt+l}', } cmd = indent_commands[words[0]] num = baseutils.set_number(words) if num == '1': api.send_string(cmd) return api.send_string('{escape}' + num + indent_commands[words[0]] + 'i')
def backspace(self, words): for i in range(int(baseutils.set_number(words))): api.send_string('{backspace}')