示例#1
0
 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)
示例#2
0
 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)
示例#3
0
 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')
示例#4
0
 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')
示例#5
0
 def backspace(self, words):
     for i in range(int(baseutils.set_number(words))):
         api.send_string('{backspace}')
示例#6
0
 def backspace(self, words):
     for i in range(int(baseutils.set_number(words))):
         api.send_string('{backspace}')