def repeat(m): repeat_count = m_to_number(m) if repeat_count != None and repeat_count >= 2: repeater = Rep(repeat_count - 1) repeater.ctx = talon return repeater(None)
def repeat(self): repeater = Rep(1) repeater.ctx = talon repeater(None) if self.job: self.job = cron.after(self.repeat_delay, self.repeat) print('REPEAT')
def repeat(m): repeat_count = parse_words_as_integer(m._words[1:]) if repeat_count != None and repeat_count >= 2: repeater = Rep(repeat_count - 1) repeater.ctx = talon return repeater(None)
def repeat(m): repeat_count = parse_words_as_integer(m._words[1:]) print(talon.last) if repeat_count is not None and repeat_count >= 2: repeater = Rep(repeat_count - 1) repeater.ctx = talon return repeater(None)
def repeat(m): # repeater = Rep(int(ordinals[str(m)])) o = m.ordinals if isinstance(o, list): o = o[0] repeater = Rep(int(ordinals[o])) repeater.ctx = talon return repeater(None)
def repeat(m): # TODO: This could be made more intelligent: # * Apply a timeout after which the command will not repeat previous actions # * Prevent stacking of repetitions upon previous repetitions repeat_count = utils.m_to_number(m) if repeat_count != None and repeat_count >= 2: repeater = Rep(repeat_count - 1) repeater.ctx = talon return repeater(None)
def repeat(m): words = m._words repeat_count = text_to_number(words[1:]) print("Repeat! {} {}".format([str(w) for w in words], repeat_count)) if not repeat_count: repeat_count = 1 repeater = Rep(repeat_count) repeater.ctx = m.ctx return repeater(None)
def repeat(m): # TODO: This could be made more intelligent: # * Apply a timeout after which the command will not repeat previous actions # * Prevent stacking of repetitions upon previous repetitions repeat_count = utils.extract_num_from_m(m) if repeat_count is not None: if repeat_count >= 2: repeat_count -= 1 repeater = Rep(repeat_count) repeater.ctx = talon return repeater(None)
def repeat(m): # noinspection PyProtectedMember words = m._words repeat_count = text_to_number(words[1:]) print("Repeat! {} {}".format([str(w) for w in words], repeat_count)) if not repeat_count: repeat_count = 1 repeater = Rep(repeat_count) repeater.ctx = talon result = repeater(None) print(f"Result: {result}") return result
def repeat(m): # TODO: This could be made more intelligent: # * Apply a timeout after which the command will not repeat previous actions # * Prevent stacking of repetitions upon previous repetitions starts_with_wink = m._words[0] == 'wink' if starts_with_wink and len(m._words) == 1: repeat_count = 1 else: repeat_count = utils.extract_num_from_m(m) if repeat_count is not None: # for integrated repeats, need to subtract the first execution # "enter five times" will execute enter once and only then repeat, so need to subtract if not starts_with_wink and repeat_count >= 2: repeat_count -= 1 repeater = Rep(repeat_count) repeater.ctx = talon return repeater(None)
def repeat_delay(n, delay=0.09): for i in range(n): sleep(delay) repeater = Rep(i - 1) repeater.ctx = talon repeater(None)
def repeat(m): o = m["repeater.ordinals"][0] repeater = Rep(int(ordinals[o])) repeater.ctx = talon return repeater(None)